Merge "Fix run-tempest black/exclude var setting"
diff --git a/roles/run-tempest/defaults/main.yaml b/roles/run-tempest/defaults/main.yaml
index e7a1cc6..52713be 100644
--- a/roles/run-tempest/defaults/main.yaml
+++ b/roles/run-tempest/defaults/main.yaml
@@ -1,10 +1,6 @@
devstack_base_dir: /opt/stack
tempest_test_regex: ''
tox_envlist: smoke
-# TODO(kopecmartin) remove tempest_black_regex once all consumers of this
-# role have switched to the tempest_exclude_regex option.
-tempest_black_regex: ''
-tempest_exclude_regex: ''
tox_extra_args: ''
tempest_test_timeout: ''
stable_constraints_file: "{{ devstack_base_dir }}/requirements/upper-constraints.txt"
diff --git a/roles/run-tempest/tasks/main.yaml b/roles/run-tempest/tasks/main.yaml
index e9c8e92..999e256 100644
--- a/roles/run-tempest/tasks/main.yaml
+++ b/roles/run-tempest/tasks/main.yaml
@@ -70,22 +70,16 @@
# TODO(kopecmartin) remove this after all consumers of the role have switched
# to tempest_exclude_regex option, until then it's kept here for the backward
# compatibility
-- name: Set tempest_exclude_regex
+- name: Build exclude regex (old param)
set_fact:
- tempest_exclude_regex: "{{ tempest_black_regex }}"
+ tempest_test_exclude_regex: "--black-regex={{tempest_black_regex|quote}}"
when:
- tempest_black_regex is defined
- tempest_exclude_regex is not defined
-- name: Build exclude regex (old param)
- set_fact:
- tempest_exclude_regex: "--black-regex={{tempest_black_regex|quote}}"
- when:
- - tempest_black_regex is defined
-
- name: Build exclude regex (new param)
set_fact:
- tempest_exclude_regex: "--exclude-regex={{tempest_exclude_regex|quote}}"
+ tempest_test_exclude_regex: "--exclude-regex={{tempest_exclude_regex|quote}}"
when:
- tempest_black_regex is not defined
- tempest_exclude_regex is defined
@@ -94,7 +88,7 @@
command: tox -e {{tox_envlist}} {{tox_extra_args}} -- {{tempest_test_regex|quote}} \
{{blacklist_option|default('')}} {{exclude_list_option|default('')}} \
--concurrency={{tempest_concurrency|default(default_concurrency)}} \
- {{tempest_exclude_regex|default('')}}
+ {{tempest_test_exclude_regex|default('')}}
args:
chdir: "{{devstack_base_dir}}/tempest"
register: tempest_run_result