aboutsummaryrefslogtreecommitdiff
path: root/verif/checker/tosa_result_checker.py
diff options
context:
space:
mode:
authorJeremy Johnson <jeremy.johnson@arm.com>2023-11-27 15:02:04 +0000
committerEric Kunze <eric.kunze@arm.com>2023-12-04 21:09:12 +0000
commit39f343498425dd4a0aa0937692a8e630b535e06b (patch)
tree97a7a7b4575a00537a03cf71ab08681f19acd8ab /verif/checker/tosa_result_checker.py
parent534923df858de76c6e0b0a2689cc23917e873548 (diff)
downloadreference_model-39f343498425dd4a0aa0937692a8e630b535e06b.tar.gz
Path fixes for ref model and libraries
Support relative desc.json paths in refmodel of just "desc.json". Catch when generate and verify library paths are None and provide help in tosa_verif_check_result. Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ie52ac399ea002e5fcdcc1eec3d9df6153a778e88
Diffstat (limited to 'verif/checker/tosa_result_checker.py')
-rw-r--r--verif/checker/tosa_result_checker.py21
1 files changed, 15 insertions, 6 deletions
diff --git a/verif/checker/tosa_result_checker.py b/verif/checker/tosa_result_checker.py
index 8c7e432..6948378 100644
--- a/verif/checker/tosa_result_checker.py
+++ b/verif/checker/tosa_result_checker.py
@@ -63,18 +63,25 @@ def compliance_check(
ofm_name,
verify_lib_path,
):
- try:
- vlib = VerifierLibrary(verify_lib_path)
- except VerifierError as e:
+ if verify_lib_path is None:
+ error = "Please supply --verify-lib-path"
+ else:
+ error = None
+ try:
+ vlib = VerifierLibrary(verify_lib_path)
+ except VerifierError as e:
+ error = str(e)
+
+ if error is not None:
_print_result(LogColors.RED, f"INTERNAL ERROR {test_name}")
- msg = f"Could not load verfier library: {str(e)}"
+ msg = f"Could not load verfier library: {error}"
return (TestResult.INTERNAL_ERROR, 0.0, msg)
success = vlib.verify_data(
ofm_name, compliance_config, imp_result_path, ref_result_path, bnd_result_path
)
if success:
- _print_result(LogColors.GREEN, f"Results PASS {test_name}")
+ _print_result(LogColors.GREEN, f"Compliance Results PASS {test_name}")
return (TestResult.PASS, 0.0, "")
else:
_print_result(LogColors.RED, f"Results NON-COMPLIANT {test_name}")
@@ -279,8 +286,10 @@ def main(argv=None):
"--fp-tolerance", type=float, default=DEFAULT_FP_TOLERANCE, help="FP tolerance"
)
parser.add_argument(
- "--test_path", type=Path, help="path to the test that produced the results"
+ "--test-path", type=Path, help="path to the test that produced the results"
)
+ # Deprecate the incorrectly formatted option by hiding it
+ parser.add_argument("--test_path", type=Path, help=argparse.SUPPRESS)
parser.add_argument(
"--bnd-result-path",
type=Path,