run-tempest role: new tempest_test_regex variable
Specify a regular expression to filter the tests.
Change-Id: I44911c6bd6ede68c3376c8a6b42700310dce7a06
diff --git a/roles/run-tempest/README.rst b/roles/run-tempest/README.rst
index a75fc31..001586e 100644
--- a/roles/run-tempest/README.rst
+++ b/roles/run-tempest/README.rst
@@ -12,6 +12,13 @@
The number of parallel test processes.
+.. zuul:rolevar:: tempest_test_regex
+ :default: ''
+
+ A regular expression used to select the tests.
+ It works only when used with some specific tox environments
+ ('all', 'all-plugin'.)
+
.. zuul:rolevar:: tox_venvlist
:default: smoke
diff --git a/roles/run-tempest/defaults/main.yaml b/roles/run-tempest/defaults/main.yaml
index e1e81da..3e57511 100644
--- a/roles/run-tempest/defaults/main.yaml
+++ b/roles/run-tempest/defaults/main.yaml
@@ -1,2 +1,3 @@
devstack_base_dir: /opt/stack
+tempest_test_regex: ''
tox_venvlist: smoke
diff --git a/roles/run-tempest/tasks/main.yaml b/roles/run-tempest/tasks/main.yaml
index d079513..297cd72 100644
--- a/roles/run-tempest/tasks/main.yaml
+++ b/roles/run-tempest/tasks/main.yaml
@@ -21,7 +21,7 @@
when: num_cores|int > 3
- name: Run Tempest
- command: tox -e {{tox_venvlist}} -- --concurrency={{tempest_concurrency|default(default_concurrency)}}
+ command: tox -e {{tox_venvlist}} -- {{tempest_test_regex|quote}} --concurrency={{tempest_concurrency|default(default_concurrency)}}
args:
chdir: "{{devstack_base_dir}}/tempest"
become: true