diff options
author | Juha Kosonen <juha.kosonen@nokia.com> | 2019-08-26 13:28:41 +0300 |
---|---|---|
committer | Cedric Ollivier <cedric.ollivier@orange.com> | 2019-08-26 21:28:30 +0000 |
commit | 41692fe4d67e714a69813287bdb28e07f01d5700 (patch) | |
tree | af98ab03b236d7e20c5928d8651530c1b92e5cde | |
parent | b44b6d717fc92904d4c70d4c26bdad4619929160 (diff) |
Support regex in tempest blacklist
The expression both in the test cases as well as applicable scenarios
support regex in blacklist.
Change-Id: Id76297a1cfbf908bda67641bc7ba686db83d76e6
Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
-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') |