diff options
author | Cedric Ollivier <cedric.ollivier@orange.com> | 2019-08-27 21:03:13 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2019-08-27 21:03:13 +0000 |
commit | 26382c8bfca729cf87c85542ae8ce7088395f87e (patch) | |
tree | 62b7be39b9f317742036f639290bb74a6ff17d27 | |
parent | 84e765835f50e597a82c728bdea0564df0157b24 (diff) | |
parent | c5a09bf6161fd73b79791a0ec293a4ba7c38d1a5 (diff) |
Merge "Support regex in tempest blacklist"
-rw-r--r-- | functest/opnfv_tests/openstack/tempest/tempest.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index be86cee86..9c84cdc82 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -368,18 +368,17 @@ class TempestCommon(singlevm.VmReady2): black_list_file.close() for item in black_list_yaml: scenarios = item['scenarios'] - if deploy_scenario in scenarios: + in_it = rally.RallyBase.in_iterable_re + if in_it(deploy_scenario, scenarios): tests = item['tests'] - for test in tests: - black_tests.append(test) - break + black_tests.extend(tests) except Exception: # pylint: disable=broad-except black_tests = [] LOGGER.debug("Tempest blacklist file does not exist.") for cases_line in cases_file: for black_tests_line in black_tests: - if black_tests_line in cases_line: + if re.search(black_tests_line, cases_line): break else: result_file.write(str(cases_line) + '\n') |