Add config option to skip tempest tests

Add new option "CONFIG_SKIP_TEMPEST_TESTS" to allow
skipping some of tempest tests which are defined
with "CONFIG_RUN_TEMPEST_TESTS". So for scenario to run
all smoke and dashboard tests except "test_volume_create" tests
following can be configured:-

CONFIG_RUN_TEMPEST_TESTS: "smoke dashboard"
CONFIG_SKIP_TEMPEST_TESTS: "test_volume_create"

Change-Id: Idab8dae17437f0940f872195f53fc934893aa283
This commit is contained in:
yatinkarel 2021-01-25 16:58:54 +05:30
parent 5eba92a52e
commit 83214319b1
4 changed files with 24 additions and 1 deletions

View File

@ -1023,6 +1023,9 @@ Provisioning tempest config
**CONFIG_RUN_TEMPEST_TESTS**
Test suites to run, example: "smoke dashboard TelemetryAlarming". Optional, defaults to "smoke".
**CONFIG_SKIP_TEMPEST_TESTS**
Tests to skip, example: "test_basic_scenario test_volume". Optional, defaults to "".
**CONFIG_PROVISION_UEC_IMAGE_NAME**
Name of the uec image created in Glance used in tempest tests (default "cirros-uec").

View File

@ -56,8 +56,9 @@ def run_tempest(config, messages):
print("Running Tempest on %s" % config['CONFIG_TEMPEST_HOST'])
server = utils.ScriptRunner(config['CONFIG_TEMPEST_HOST'])
server.append('pushd /var/lib/tempest')
server.append('tempest run --regex \'(%s)\' --concurrency 2 > %s'
server.append('tempest run --regex \'(%s)\' --black-regex \'%s\' --concurrency 2 > %s'
% (config['CONFIG_RUN_TEMPEST_TESTS'].replace(' ', '|'),
config['CONFIG_SKIP_TEMPEST_TESTS'].replace(' ', '|'),
logfile))
server.append('popd')
server.execute()

View File

@ -342,6 +342,19 @@ def initConfig(controller):
"CONF_NAME": "CONFIG_RUN_TEMPEST_TESTS",
"USE_DEFAULT": False,
"NEED_CONFIRM": False,
"CONDITION": False},
{"CMD_OPTION": "skip-tempest-tests",
"PROMPT": ("What tempest tests should skipped ?"
" (If blank, Tempest will not skip any tests)"),
"OPTION_LIST": [],
"VALIDATORS": False,
"DEFAULT_VALUE": "",
"MASK_INPUT": False,
"LOOSE_VALIDATION": True,
"CONF_NAME": "CONFIG_SKIP_TEMPEST_TESTS",
"USE_DEFAULT": False,
"NEED_CONFIRM": False,
"CONDITION": False}
],

View File

@ -0,0 +1,6 @@
---
features:
- |
Add new config option "CONFIG_SKIP_TEMPEST_TESTS" to allow
skipping of some of tempest tests which are running as part
of "CONFIG_RUN_TEMPEST_TESTS".