diff options
author | evacha01 <evan.chandler@arm.com> | 2024-03-19 12:42:17 +0000 |
---|---|---|
committer | Dominic Symes <dominic.symes@arm.com> | 2024-04-03 10:12:22 +0000 |
commit | ad8e1e25e805f6face5fcf0b3906cd06db46e1d7 (patch) | |
tree | 4b59c93f1ff6844b9bbcc744f9c15212c05f2dcf /verif/conformance/test_select.py | |
parent | 12159fc6fb776908f48fbda9c74cf34980540e4f (diff) | |
download | reference_model-ad8e1e25e805f6face5fcf0b3906cd06db46e1d7.tar.gz |
Make Full Range FP16 tests into extra tests
Signed-off-by: evacha01 <evan.chandler@arm.com>
Change-Id: I8c59ecb5a1fb53d0e9bf64333709f9e3cc908b49
Diffstat (limited to 'verif/conformance/test_select.py')
-rw-r--r-- | verif/conformance/test_select.py | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/verif/conformance/test_select.py b/verif/conformance/test_select.py index 58d3f9f..e3a8ffb 100644 --- a/verif/conformance/test_select.py +++ b/verif/conformance/test_select.py @@ -259,11 +259,11 @@ class Operator: negative and "ERRORIF" in str(path) ): # Check for test set paths - match = re.match(r"(.*)_s([0-9]+)", path.name) + match = re.match(r"(.*)_(s[0-9]+|full)", path.name) if match: - if match.group(2) == "0": + if match.group(2) in ["s0", "full"]: # Only return the truncated test name - # of the first test of a set + # of the first test of a set, and for full tests yield path.with_name(match.group(1)) else: yield path @@ -308,11 +308,21 @@ class Operator: paths.append(set_path) else: if s == 0: - logger.error(f"Could not find test set 0 - {str(set_path)}") + logger.warning(f"Could not find test set 0 - {str(set_path)}") break s += 1 return paths + @staticmethod + def _get_extra_test_paths(path): + """Expand a path to find extra tests.""" + paths = [] + for suffix in ["full"]: + suffix_path = path.with_name(f"{path.name}_{suffix}") + if suffix_path.exists(): + paths.append(suffix_path) + return paths + def select_tests(self): # noqa: C901 (function too complex) """Generate the paths to the selected tests for this operator.""" if not self.test_paths: @@ -374,6 +384,9 @@ class Operator: # Must be a test set - expand to all test sets for p in Operator._get_test_set_paths(path): yield p + # check for extra tests + for p in Operator._get_extra_test_paths(path): + yield p # search for tests that match any unused parameter values for n, path in enumerate(sorted(list(unused_paths))): |