Switch to stestr

According to an Openstack summit session [1], stestr is a 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.opendev.org/p/YVR-python-pti

Change-Id: Ie2169026d93ca85337db429c171ff1f82c2fa0d5
This commit is contained in:
Vu Cong Tuan 2018-07-11 09:10:06 +07:00 committed by Pierre Riteau
parent 668323abe2
commit 965f178756
5 changed files with 15 additions and 13 deletions

4
.gitignore vendored
View File

@ -26,12 +26,10 @@ pip-log.txt
# Unit test / coverage reports # Unit test / coverage reports
.coverage .coverage
.tox .tox
nosetests.xml .stestr/
# Translations # Translations
*.mo *.mo
AUTHORS AUTHORS
ChangeLog ChangeLog
.testrepository

4
.stestr.conf Normal file
View File

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

View File

@ -1,7 +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 blazarnova $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -7,7 +7,7 @@ hacking>=4.0.0,<4.1.0 # Apache-2.0
mock>=3.0.0 # BSD mock>=3.0.0 # BSD
fixtures>=3.0.0 # Apache-2.0/BSD fixtures>=3.0.0 # Apache-2.0/BSD
testrepository>=0.0.20 # Apache-2.0/BSD stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT testtools>=2.2.0 # MIT
coverage!=4.4,>=4.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0
wsgi-intercept>=1.7.0 # MIT License wsgi-intercept>=1.7.0 # MIT License

11
tox.ini
View File

@ -15,11 +15,18 @@ setenv = VIRTUAL_ENV={envdir}
EVENTLET_NO_GREENDNS=yes EVENTLET_NO_GREENDNS=yes
PYTHONHASHSEED=0 PYTHONHASHSEED=0
commands = commands =
python setup.py testr --slowest --testr-args="{posargs}" stestr run --slowest {posargs}
sitepackages = False sitepackages = False
[testenv:cover] [testenv:cover]
commands = python setup.py testr --coverage --testr-args="{posargs}" basepython = python3
setenv =
PYTHON=coverage run --source blazarnova --parallel-mode
commands =
stestr run '{posargs}'
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:pep8] [testenv:pep8]
commands = flake8 {posargs} commands = flake8 {posargs}