Switch to stestr

stestr is maintained project to which all Openstack projects
should use.

Change-Id: I18a83ef1909e758e82f7e9d888d65363a4528249
(cherry picked from commit 90cf6a6dbe)
This commit is contained in:
rabi 2022-04-08 19:37:12 +05:30 committed by Sandeep Yadav
parent b30db4e2fe
commit a872a8f97f
5 changed files with 17 additions and 6 deletions

1
.gitignore vendored
View File

@ -38,6 +38,7 @@ cover
.coverage
.tox
.testrepository
.stestr/*
nosetests.xml
# Translations

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=${TEST_PATH:-./tripleo_heat_templates/tests}
top_dir=./

View File

@ -1,4 +0,0 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 OS_LOG_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ $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
testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
stestr>=2.0.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
yaql>=1.1.3 # Apache 2.0 License
ansible-runner>=1.4.2 # Apache

14
tox.ini
View File

@ -13,7 +13,9 @@ deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/wallaby}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python setup.py testr --slowest --testr-args='{posargs}'
commands =
stestr run {posargs}
stestr slowest
[testenv:venv]
commands = {posargs}
@ -71,7 +73,15 @@ whitelist_externals =
commands = bash -c tools/releasenotes_tox.sh
[testenv:cover]
commands = python setup.py test --coverage --coverage-package-name=tripleo_heat_templates --testr-args='{posargs}'
setenv =
PYTHON=coverage run --source tripleo_heat_templates --parallel-mode
commands =
coverage erase
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:genconfig]
commands =