Added tempest_black_regex to skip tempest tests

* https://review.openstack.org/547106 adds a black_regex flag to
  tempest run. We can use the same in devstack-tempest base job
  to skip/blacklist tests.

Change-Id: I9ed91b01ddb7ec0a3d23305031afbac7c4b16c55
This commit is contained in:
Chandan Kumar 2018-02-26 10:22:29 +00:00
parent 0a13ede274
commit a9445043df
3 changed files with 21 additions and 1 deletions

View File

@ -39,3 +39,20 @@ Run Tempest
:default: smoke
The Tempest tox environment to run.
.. zuul:rolevar:: tempest_black_regex
:default: ''
A regular expression used to skip the tests.
It works only when used with some specific tox environments
('all', 'all-plugin'.)
Multi-line and commented regexs can be achieved by doing this:
::
vars:
tempest_black_regex: |
(?x) # Ignore comments and whitespaces
# Line with only a comment.
(tempest.api.identity).*$

View File

@ -1,3 +1,4 @@
devstack_base_dir: /opt/stack
tempest_test_regex: ''
tox_envlist: smoke
tempest_black_regex: ''

View File

@ -35,7 +35,9 @@
when: blacklist_stat.stat.exists
- name: Run Tempest
command: tox -e {{tox_envlist}} -- {{tempest_test_regex|quote}} {{blacklist_option|default('')}} --concurrency={{tempest_concurrency|default(default_concurrency)}}
command: tox -e {{tox_envlist}} -- {{tempest_test_regex|quote}} {{blacklist_option|default('')}} \
--concurrency={{tempest_concurrency|default(default_concurrency)}} \
--black-regex={{tempest_black_regex|quote}}
args:
chdir: "{{devstack_base_dir}}/tempest"
become: true