summaryrefslogtreecommitdiff
path: root/roles/run-tempest-26
diff options
context:
space:
mode:
authorLukáš Piwowarski <lpiwowar@redhat.com>2023-01-06 09:57:04 +0100
committerMartin Kopec <mkopec@redhat.com>2023-01-31 14:14:45 +0100
commitbd6481d93431738c72964ea0f8dd1d3e40c9778a (patch)
tree06384bdf727209990a1d628af03e4255c05ec31c /roles/run-tempest-26
parent7416b91cf74776530eafc62cc9b83c49a8103748 (diff)
downloadtempest-bd6481d93431738c72964ea0f8dd1d3e40c9778a.tar.gz
Fix default values for variables in run-tempest role
With the new version of tox the parsing of postargs value has changed. Previously an empty string was discarded by tox if it appeared in the postargs value in contrast with the latest version of tox which leaves the empty string intact. The behavior of the latest tox version makes some jobs fail as some variables in the run-tempest role have an empty string as a default value. This leads in some cases to the execution of an incorrect tempest command, for example: tempest run --regex '[.*\bsmoke\b.*]' '' --concurrency=2 The patch changes the default value for blacklist_option, exclude_list_option and tempest_test_regex variables to None to prevent an empty string from being passed to postargs variable in tox. Change-Id: I006e33c5ea0753b68cf1feb8580cb029209af9a8
Diffstat (limited to 'roles/run-tempest-26')
-rw-r--r--roles/run-tempest-26/tasks/main.yaml4
1 files changed, 3 insertions, 1 deletions
diff --git a/roles/run-tempest-26/tasks/main.yaml b/roles/run-tempest-26/tasks/main.yaml
index f8460063c..7423bfba4 100644
--- a/roles/run-tempest-26/tasks/main.yaml
+++ b/roles/run-tempest-26/tasks/main.yaml
@@ -62,7 +62,9 @@
when: blacklist_stat.stat.exists
- name: Run Tempest
- command: tox -e {{tox_envlist}} {{tox_extra_args}} -- {{tempest_test_regex|quote}} {{blacklist_option|default('')}} \
+ command: tox -e {{tox_envlist}} {{tox_extra_args}} -- \
+ {{tempest_test_regex|quote if (tempest_test_regex|length>0)|default(None, True)}} \
+ {{blacklist_option|default(None)}} \
--concurrency={{tempest_concurrency|default(default_concurrency)}} \
--black-regex={{tempest_black_regex|quote}}
args: