Make setenv consistent for unit, func, and api-samples
Since ostestr switched to running stestr under the covers, we lost the old magic setting of the environment variables via .testr.conf for capturing stderr/stdout and the test timeout. This makes the unit, functional, and api-samples envs consistent with the py27 env that was already updated to set those variables. This also updates the pretty_tox3.sh script to run stestr directly. Change-Id: I27fa9b7e25c1a1dc921653eec84864423f898a85
This commit is contained in:
parent
3174ee13a1
commit
53f244da12
@ -9,7 +9,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$TESTRARGS" ]; then
|
if [ -z "$TESTRARGS" ]; then
|
||||||
ostestr --blacklist_file $blacklist_file
|
stestr run --blacklist-file $blacklist_file
|
||||||
else
|
else
|
||||||
ostestr -r "$TESTRARGS"
|
stestr run "$TESTRARGS"
|
||||||
fi
|
fi
|
||||||
|
26
tox.ini
26
tox.ini
@ -12,7 +12,6 @@ whitelist_externals = bash
|
|||||||
env
|
env
|
||||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
OS_TEST_PATH=./nova/tests/unit
|
|
||||||
LANGUAGE=en_US
|
LANGUAGE=en_US
|
||||||
LC_ALL=en_US.utf-8
|
LC_ALL=en_US.utf-8
|
||||||
OS_STDOUT_CAPTURE=1
|
OS_STDOUT_CAPTURE=1
|
||||||
@ -27,6 +26,8 @@ passenv = OS_DEBUG GENERATE_HASHES
|
|||||||
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
||||||
|
|
||||||
[testenv:py27]
|
[testenv:py27]
|
||||||
|
setenv = {[testenv]setenv}
|
||||||
|
OS_TEST_PATH=./nova/tests/unit
|
||||||
commands =
|
commands =
|
||||||
{[testenv]commands}
|
{[testenv]commands}
|
||||||
stestr run '{posargs}'
|
stestr run '{posargs}'
|
||||||
@ -34,6 +35,8 @@ commands =
|
|||||||
stestr slowest
|
stestr slowest
|
||||||
|
|
||||||
[testenv:py35]
|
[testenv:py35]
|
||||||
|
setenv = {[testenv]setenv}
|
||||||
|
OS_TEST_PATH=./nova/tests/unit
|
||||||
commands =
|
commands =
|
||||||
{[testenv]commands}
|
{[testenv]commands}
|
||||||
bash tools/pretty_tox3.sh '{posargs}'
|
bash tools/pretty_tox3.sh '{posargs}'
|
||||||
@ -64,11 +67,10 @@ commands =
|
|||||||
# python 3.x
|
# python 3.x
|
||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = {[testenv]setenv}
|
||||||
OS_TEST_PATH=./nova/tests/functional
|
OS_TEST_PATH=./nova/tests/functional
|
||||||
LANGUAGE=en_US
|
|
||||||
commands =
|
commands =
|
||||||
find . -type f -name "*.pyc" -delete
|
{[testenv]commands}
|
||||||
stestr run '{posargs}'
|
stestr run '{posargs}'
|
||||||
stestr slowest
|
stestr slowest
|
||||||
|
|
||||||
@ -77,20 +79,18 @@ commands =
|
|||||||
[testenv:functional-py35]
|
[testenv:functional-py35]
|
||||||
basepython = python3.5
|
basepython = python3.5
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = {[testenv]setenv}
|
||||||
OS_TEST_PATH=./nova/tests/functional
|
OS_TEST_PATH=./nova/tests/functional
|
||||||
LANGUAGE=en_US
|
|
||||||
commands =
|
commands =
|
||||||
{[testenv]commands}
|
{[testenv]commands}
|
||||||
bash tools/pretty_tox3.sh '{posargs}'
|
bash tools/pretty_tox3.sh '{posargs}'
|
||||||
|
|
||||||
[testenv:api-samples]
|
[testenv:api-samples]
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = {[testenv]setenv}
|
||||||
GENERATE_SAMPLES=True
|
GENERATE_SAMPLES=True
|
||||||
PYTHONHASHSEED=0
|
PYTHONHASHSEED=0
|
||||||
OS_TEST_PATH=./nova/tests/functional/api_sample_tests
|
OS_TEST_PATH=./nova/tests/functional/api_sample_tests
|
||||||
LANGUAGE=en_US
|
|
||||||
commands =
|
commands =
|
||||||
find . -type f -name "*.pyc" -delete
|
find . -type f -name "*.pyc" -delete
|
||||||
stestr run '{posargs}'
|
stestr run '{posargs}'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user