diff --git a/.github/workflows/test-cm-scripts.yml b/.github/workflows/test-cm-scripts.yml index 6e8914e70c..4e54004ee0 100644 --- a/.github/workflows/test-cm-scripts.yml +++ b/.github/workflows/test-cm-scripts.yml @@ -32,3 +32,4 @@ jobs: - name: Test CM Script run: | python tests/script/test_install.py + python tests/script/test_deps.py diff --git a/tests/script/test_deps.py b/tests/script/test_deps.py new file mode 100644 index 0000000000..4c19b75ed4 --- /dev/null +++ b/tests/script/test_deps.py @@ -0,0 +1,18 @@ +# This test covers version, variation, compilation from src, add_deps_recursive, post_deps +try: + import cmind as cm + + r = cm.access({'action':'run', 'automation':'script', 'tags': 'generate-run-cmds,mlperf', 'add_deps_recursive': + {'inference-src': {'tags': '_octoml'}, 'loadgen': {'version': 'r2.1'}}, 'env': {'CM_MODEL': 'resnet50', + 'CM_DEVICE': 'cpu', 'CM_BACKEND': 'onnxruntime'}}) + if 'return' not in r: + raise Exception('CM access function should always return key \'return\'!') + if 'error' in r: + raise Exception(r['error']) + + exit(0) + +except ImportError as e: + from sys import stderr + print('CM module for python is not installed', file=stderr) + exit(1) diff --git a/tests/script/test_install.py b/tests/script/test_install.py index 228e5075be..9831715bd8 100644 --- a/tests/script/test_install.py +++ b/tests/script/test_install.py @@ -1,3 +1,4 @@ +# This test covers script installation, version, shared library install try: import cmind as cm