Pass tox_extra_args to Run tempest task

Patrole needs access to global packages, but the 'all-plugin' is
deprecated[0] and 'all' defines a sitepackages option as False[1].
Adding tox_extra_args option makes it possible to configure Zuul and
pass --sitepackages argument to tox.

[0] 9b4c50cf63/tox.ini (L64)
[1] 9b4c50cf63/tox.ini (L7)

Change-Id: Ib3264f54075216471720483c8dd816887c1f413c
This commit is contained in:
Sergey Vilgelm 2018-11-06 10:34:03 -06:00
parent 15e9679532
commit 2979bff949
No known key found for this signature in database
GPG Key ID: 08D0E2FF778887E6
3 changed files with 13 additions and 1 deletions

View File

@ -56,3 +56,14 @@ Run Tempest
(?x) # Ignore comments and whitespaces
# Line with only a comment.
(tempest.api.identity).*$
.. zuul:rolevar:: tox_extra_args
:default: ''
String of extra command line options to pass to tox.
Here is an example of running tox with --sitepackages option:
::
vars:
tox_extra_args: --sitepackages

View File

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

View File

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