Switch to stestr

According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

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

Change-Id: I75bea8174b9473b0648e1fc524dd8ea25dfb666d
This commit is contained in:
Vu Cong Tuan 2018-07-10 15:46:48 +07:00
parent 8762e61c10
commit 337e3c2d93
6 changed files with 15 additions and 12 deletions

2
.gitignore vendored
View File

@ -27,7 +27,7 @@ pip-log.txt
.tox
nosetests.xml
cover
.testrepository
.stestr/
*.sqlite
.venv

4
.stestr.conf Normal file
View File

@ -0,0 +1,4 @@
[DEFAULT]
test_path=./osprofiler/tests/unit
top_dir=./

View File

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

View File

@ -18,6 +18,6 @@ reno===2.5.0
requests===2.14.2
six===1.10.0
sphinx===1.6.2
testrepository===0.0.18
stestr==2.0.0
testtools===2.2.0
WebOb===1.7.1

View File

@ -3,7 +3,7 @@ hacking>=0.12.0,!=0.13.0,<0.14 # Apache-2.0
coverage>=4.0 # Apache-2.0
ddt>=1.0.1 # MIT
mock>=2.0.0 # BSD
testrepository>=0.0.18 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT
openstackdocstheme>=1.18.1 # Apache-2.0

13
tox.ini
View File

@ -14,12 +14,9 @@ deps =
-r{toxinidir}/test-requirements.txt
install_command = pip install -U {opts} {packages}
usedevelop = True
commands = python setup.py testr --slowest --testr-args='{posargs}'
commands = stestr run --slowest {posargs}
distribute = false
[testenv:py27]
basepython = python2.7
[testenv:functional]
basepython = python2.7
setenv = {[testenv]setenv}
@ -47,7 +44,13 @@ commands = {posargs}
[testenv:cover]
basepython = python3
commands = python setup.py testr --coverage --testr-args='{posargs}'
setenv =
PYTHON=coverage run --source osprofiler --parallel-mode
commands =
stestr run '{posargs}'
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
basepython = python3