aboutsummaryrefslogtreecommitdiff
path: root/verif/conformance/tosa_verif_conformance_generator.py
diff options
context:
space:
mode:
Diffstat (limited to 'verif/conformance/tosa_verif_conformance_generator.py')
-rw-r--r--verif/conformance/tosa_verif_conformance_generator.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/verif/conformance/tosa_verif_conformance_generator.py b/verif/conformance/tosa_verif_conformance_generator.py
index 4b57f63..817b242 100644
--- a/verif/conformance/tosa_verif_conformance_generator.py
+++ b/verif/conformance/tosa_verif_conformance_generator.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2021-2022, ARM Limited.
+# Copyright (c) 2021-2023, ARM Limited.
# SPDX-License-Identifier: Apache-2.0
"""Build conformance tests.
@@ -113,8 +113,9 @@ def build_op_tests(args, profile, operator, test_params):
build_cmds_list.append(build_cmd_pos_test)
if args.test_type in ["negative", "both"]:
- # Get target-dtypes options only to limit tests to those needed
+ # Get target-dtypes options and any filter string to limit tests
target_dtypes_args = []
+ filter_str = None
for arglist in test_params[operator]["generator_args"]:
idx = 0
while idx < len(arglist):
@@ -122,8 +123,13 @@ def build_op_tests(args, profile, operator, test_params):
if arglist[idx + 1] not in target_dtypes_args:
target_dtypes_args.extend(arglist[idx : idx + 2])
idx += 1 # skip over option (and then argument below)
+ elif arglist[idx] == "--filter":
+ filter_str = arglist[idx + 1]
+ idx += 1 # skip over option (and then argument below)
idx += 1
build_cmd_neg_test = build_cmd_base.copy()
+ if filter_str:
+ build_cmd_neg_test.extend(["--filter", filter_str])
build_cmd_neg_test.extend(["--test-type", "negative"])
# Limit sizes of negative tests
dim_range = (