Set regex flag on ostestr command for osprofiler tests
In the unit test tox jobs we run the whole test suite first and after that exits successfully we also run the osprofiler tests while setting an osprofiler env variable to enable osprofiler. However the regex isn't being set properly in ostestr, you set the selection regex with the --regex flag. [1] This only works by chance because ostestr will pass any unrecognized args to the subprocess used to run testr internally, and testr leverages that as a regex. But in the latest os-testr release it doesn't subprocess internally anymore and this doesn't work. This commit fixes things to properly set the regex in ostestr so it works in both old and new versions. The order of the test runs is also switched because we capture the last test run's subunit for openstack-health and other analysis, so we want to full test run to be used for this. [1] https://docs.openstack.org/os-testr/latest/user/ostestr.html#test-selection Change-Id: I890505d65ca6043ddbdcc5895f2620391b505756
This commit is contained in:
parent
432f2bef3b
commit
0566870b9f
4
tox.ini
4
tox.ini
@ -26,14 +26,14 @@ passenv = OS_DEBUG GENERATE_HASHES
|
||||
[testenv:py27]
|
||||
commands =
|
||||
{[testenv]commands}
|
||||
env TEST_OSPROFILER=1 ostestr --regex 'nova.tests.unit.test_profiler'
|
||||
ostestr '{posargs}'
|
||||
env TEST_OSPROFILER=1 ostestr 'nova.tests.unit.test_profiler'
|
||||
|
||||
[testenv:py35]
|
||||
commands =
|
||||
{[testenv]commands}
|
||||
env TEST_OSPROFILER=1 ostestr --regex 'nova.tests.unit.test_profiler'
|
||||
bash tools/pretty_tox3.sh '{posargs}'
|
||||
env TEST_OSPROFILER=1 ostestr 'nova.tests.unit.test_profiler'
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python2.7
|
||||
|
Loading…
x
Reference in New Issue
Block a user