diff options
author | Jeremy Johnson <jeremy.johnson@arm.com> | 2023-09-27 16:10:59 +0100 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2023-09-28 18:27:41 +0000 |
commit | f0348ea4206a7e02497515ffb6d88546e0121cc7 (patch) | |
tree | 35a003fdff5208864b6b85dff005ce0127ff649a /verif/tests | |
parent | f9c0ceea99e197ab14f779eb51c5e1479dbeb4dd (diff) | |
download | reference_model-f0348ea4206a7e02497515ffb6d88546e0121cc7.tar.gz |
Refactor path arguments to tosa-tools
tosa_verif_conformance_generator
- Move to using ref-model-path instead of ref-model-dir
- Add schema-path and flatc-path
- Add model_files module to locate default places for files
convert2conformance
- Remove default paths
verifier
- Switch to using exact path of verifier library
tosa_verif_run_tests
- Use conformance model_files to locate defaults
Change-Id: Ieca3b164670e2a7dcb047743667cc4e8317daa97
Signed-off-by: Josef Malmström <josef.malmstrom@arm.com>
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
Diffstat (limited to 'verif/tests')
-rw-r--r-- | verif/tests/test_tosa_run_tests_args.py | 4 | ||||
-rw-r--r-- | verif/tests/test_tosa_verifier.py | 8 | ||||
-rw-r--r-- | verif/tests/tosa_mock_sut_run.py | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/verif/tests/test_tosa_run_tests_args.py b/verif/tests/test_tosa_run_tests_args.py index a0c3ed5..e6c5001 100644 --- a/verif/tests/test_tosa_run_tests_args.py +++ b/verif/tests/test_tosa_run_tests_args.py @@ -1,5 +1,5 @@ """Tests for tosa_verif_run_tests.py.""" -# Copyright (c) 2021-2022, ARM Limited. +# Copyright (c) 2021-2023, ARM Limited. # SPDX-License-Identifier: Apache-2.0 from runner.tosa_verif_run_tests import parseArgs @@ -15,7 +15,7 @@ def test_args_ref_model_path(): """Test arguments - ref_model_path.""" args = ["--ref-model-path", "ref_model_path", "-t", "test"] parsed_args = parseArgs(args) - assert parsed_args.ref_model_path == "ref_model_path" + assert str(parsed_args.ref_model_path) == "ref_model_path" def test_args_ref_debug(): diff --git a/verif/tests/test_tosa_verifier.py b/verif/tests/test_tosa_verifier.py index 9524158..996939c 100644 --- a/verif/tests/test_tosa_verifier.py +++ b/verif/tests/test_tosa_verifier.py @@ -26,12 +26,12 @@ def test_verifier_lib_built(): def test_checker_verifier_load_fail(): with pytest.raises(VerifierError) as excinfo: VerifierLibrary(Path("/place-that-does-not-exist")) - assert str(excinfo.value).startswith(f"Could not find {VERIFIER_LIB}") + assert str(excinfo.value).startswith("Could not find verify library") @pytest.mark.postcommit def test_checker_verifier_load(): - vlib = VerifierLibrary(VERIFIER_LIB_PATH.parent) + vlib = VerifierLibrary(VERIFIER_LIB_PATH) assert vlib @@ -48,7 +48,7 @@ JSON_COMPLIANCE_DOT_PRODUCT = { @pytest.mark.postcommit def test_checker_verifier_dot_product_check(): - vlib = VerifierLibrary(VERIFIER_LIB_PATH.parent) + vlib = VerifierLibrary(VERIFIER_LIB_PATH) assert vlib imp_arr = np.zeros((10, 10, 10), dtype=np.float32) @@ -63,7 +63,7 @@ def test_checker_verifier_dot_product_check(): @pytest.mark.postcommit def test_checker_verifier_dot_product_check_fail(): - vlib = VerifierLibrary(VERIFIER_LIB_PATH.parent) + vlib = VerifierLibrary(VERIFIER_LIB_PATH) assert vlib imp_arr = np.zeros((10, 10, 10), dtype=np.float32) diff --git a/verif/tests/tosa_mock_sut_run.py b/verif/tests/tosa_mock_sut_run.py index 9572618..295ee92 100644 --- a/verif/tests/tosa_mock_sut_run.py +++ b/verif/tests/tosa_mock_sut_run.py @@ -1,5 +1,5 @@ """TOSA test runner module for a mock System Under Test (SUT).""" -# Copyright (c) 2021, ARM Limited. +# Copyright (c) 2021-2023, ARM Limited. # SPDX-License-Identifier: Apache-2.0 import os @@ -33,7 +33,7 @@ class TosaSUTRunner(TosaTestRunner): print(f"MOCK SUT: Runner argument dictionary: {sutArgs}") # Useful meta data and arguments - tosaFlatbufferSchema = self.args.operator_fbs + tosaFlatbufferSchema = str(self.args.schema_path) tosaSubgraphFile = self.testDesc["tosa_file"] tosaTestDirectory = self.testDir tosaTestDescFile = self.descFile |