Switch to using 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: I6f7d8766969bce4efd5c0bc36df2d583800e1e3e
This commit is contained in:
tpatil 2019-06-19 03:54:45 +00:00
parent 8fe6937f9c
commit d0e53dfd56
3 changed files with 15 additions and 12 deletions

4
.stestr.conf Normal file
View File

@ -0,0 +1,4 @@
[DEFAULT]
test_path=./masakarimonitors/tests/unit
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 -t ./ . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

16
tox.ini
View File

@ -15,25 +15,24 @@ whitelist_externals = bash
find
rm
env
# By default ostestr will set concurrency
# By default stestr will set concurrency
# to ncpu, to specify something else use
# the concurrency=<n> option.
# call ie: 'tox -epy27 -- --concurrency=4'
commands =
find . -type f -name "*.pyc" -delete
rm -Rf .testrepository/times.dbm
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY OS_DEBUG GENERATE_HASHES
[testenv:py27]
commands =
{[testenv]commands}
ostestr '{posargs}'
stestr run {posargs}
[testenv:py36]
basepython = python3.6
commands =
{[testenv]commands}
ostestr '{posargs}'
stestr run {posargs}
[testenv:genconfig]
basepython = python3
@ -49,7 +48,14 @@ commands = {posargs}
[testenv:cover]
basepython = python3
commands = python setup.py test --coverage --testr-args='{posargs}'
setenv =
VIRTUAL_ENV={envdir}
PYTHON=coverage run --source masakarimonitors --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
basepython = python3