diff options
Diffstat (limited to 'automated/utils/test-runner.py')
-rwxr-xr-x | automated/utils/test-runner.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/automated/utils/test-runner.py b/automated/utils/test-runner.py index 2f113d8..a6260e0 100755 --- a/automated/utils/test-runner.py +++ b/automated/utils/test-runner.py @@ -65,12 +65,20 @@ class TestPlan(object): test_plan = yaml.safe_load(f) try: test_list = [] + unique_tests = [] # List of test hashes for requirement in test_plan['requirements']: if 'tests' in requirement.keys(): if requirement['tests'] and \ kind in requirement['tests'].keys() and \ requirement['tests'][kind]: for test in requirement['tests'][kind]: + test_hash = hash(json.dumps(test, sort_keys=True)) + if test_hash in unique_tests: + # Test is already in the test_list; don't add it again. + self.logger.warning( + "Skipping duplicate test {}".format(test)) + continue + unique_tests.append(test_hash) test_list.append(test) for test in test_list: test['uuid'] = str(uuid4()) |