Switch to stestr

According to Openstack summit session [1] stestr is
maintained project to which all Openstack projects
should migrate.
Let's switch it then.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I430dc5268fb9ef8fcd6e1009f50fb64e32089c37
This commit is contained in:
Slawek Kaplonski 2018-05-24 11:07:41 -07:00
parent 8b0482951f
commit e17b6555ac
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 =