Remove single quotes from posargs on stestr run commands

This commit removes the single quotes from all the stestr run commands
in the tox.ini. These were originally added as a workaround from the
ostestr days to ensure people could run a subset of tests with a regex
like:

  tox -epy27 regex

With the switch to stestr this is no longer needed because stestr treats
extra arguments as a filter regex. Quoting the posargs has a negative
effect because '--' parameters are treated as a string on input instead
of a parameter.

Fixing this also uncovered another issue in the stestr commands for the
functional jobs. The CLI arg for stestr versions <=1.1.0 is
--group_regex not --group-regex. This commit fixes this to make those
jobs pass without the quotes.

Change-Id: I512a517fa6890b29de24060376b4d7e061dc3add
This commit is contained in:
Matthew Treinish 2018-02-16 17:22:59 -05:00
parent 90a92d33ed
commit 3b673dda6a
No known key found for this signature in database
GPG Key ID: FD12A0F214C9E177
1 changed files with 6 additions and 6 deletions

12
tox.ini
View File

@ -27,14 +27,14 @@ passenv = OS_DEBUG GENERATE_HASHES
[testenv:py27]
commands =
{[testenv]commands}
stestr run '{posargs}'
stestr run {posargs}
env TEST_OSPROFILER=1 stestr run --combine --no-discover 'nova.tests.unit.test_profiler'
stestr slowest
[testenv:py35]
commands =
{[testenv]commands}
stestr run --blacklist-file=tests-py3.txt '{posargs}'
stestr run --blacklist-file=tests-py3.txt {posargs}
env TEST_OSPROFILER=1 stestr run --combine --no-discover 'nova.tests.unit.test_profiler'
@ -73,7 +73,7 @@ commands =
# special way. See the following for more details.
# http://stestr.readthedocs.io/en/latest/MANUAL.html#grouping-tests
# https://gabbi.readthedocs.io/en/latest/#purpose
stestr --test-path=./nova/tests/functional --group-regex=nova\.tests\.functional\.api\.openstack\.placement\.test_placement_api(?:\.|_)([^_]+) run '{posargs}'
stestr --test-path=./nova/tests/functional --group_regex=nova\.tests\.functional\.api\.openstack\.placement\.test_placement_api(?:\.|_)([^_]+) run {posargs}
stestr slowest
# TODO(gcb) Merge this into [testenv:functional] when functional tests are gating
@ -92,7 +92,7 @@ commands =
# special way. See the following for more details.
# http://stestr.readthedocs.io/en/latest/MANUAL.html#grouping-tests
# https://gabbi.readthedocs.io/en/latest/#purpose
stestr --test-path=./nova/tests/functional --group-regex=nova\.tests\.functional\.api\.openstack\.placement\.test_placement_api(?:\.|_)([^_]+) run '{posargs}'
stestr --test-path=./nova/tests/functional --group_regex=nova\.tests\.functional\.api\.openstack\.placement\.test_placement_api(?:\.|_)([^_]+) run {posargs}
[testenv:api-samples]
usedevelop = True
@ -101,7 +101,7 @@ setenv = {[testenv]setenv}
PYTHONHASHSEED=0
commands =
find . -type f -name "*.pyc" -delete
stestr --test-path=./nova/tests/functional/api_sample_tests run '{posargs}'
stestr --test-path=./nova/tests/functional/api_sample_tests run {posargs}
stestr slowest
[testenv:genconfig]
@ -118,7 +118,7 @@ setenv = {[testenv]setenv}
commands =
coverage erase
find . -type f -name "*.pyc" -delete
stestr run '{posargs}'
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml