Merge "Switch to stestr"

This commit is contained in:
Zuul 2018-05-29 15:27:12 +00:00 committed by Gerrit Code Review
commit 55e0a3c7dd
4 changed files with 13 additions and 11 deletions

1
.gitignore vendored
View File

@ -28,6 +28,7 @@ setuptools*.egg/
!/.pylintrc
!/.stestr.conf
!/.testr.conf
.stestr/
# Files created by releasenotes build
releasenotes/build

View File

@ -1,8 +0,0 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ \
${OS_TEST_PATH:-./neutron_lib/tests/unit} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -11,6 +11,7 @@ python-subunit>=1.0.0 # Apache-2.0/BSD
oslotest>=3.2.0 # Apache-2.0
os-testr>=1.0.0 # Apache-2.0
reno>=2.5.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
testresources>=2.0.0 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT

14
tox.ini
View File

@ -9,12 +9,15 @@ passenv = TRACE_FAILONLY
install_command = pip install {opts} {packages}
setenv =
PYTHONWARNINGS=default::DeprecationWarning
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
ostestr --regex '{posargs}'
stestr run {posargs}
[testenv:pep8]
commands =
@ -32,9 +35,14 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
commands = {posargs}
[testenv:cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --source neutron_lib --parallel-mode
commands =
python setup.py test --coverage --coverage-package-name=neutron_lib --testr-args='{posargs}'
coverage report
stestr run --no-subunit-trace {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
deps =