Merge "Migrate from testr to stestr"

This commit is contained in:
Zuul 2021-08-31 16:29:40 +00:00 committed by Gerrit Code Review
commit adb8ba7dea
5 changed files with 27 additions and 18 deletions

21
.gitignore vendored
View File

@ -1,5 +1,22 @@
*.pyc
# Packages
*.egg*
dist
build
# Unit test
.tox/
.stestr/
.venv
# pbr generates these
AUTHORS
ChangeLog
# Editors
*.swp
*~
.tox
.testrepository
# Files created by releasenotes build
releasenotes/build

4
.stestr.conf Normal file
View File

@ -0,0 +1,4 @@
[DEFAULT]
test_path=./heat_tempest_plugin/tests/
top_dir=./
group_regex=([^\.]*\.)*

View File

@ -1,12 +0,0 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \
OS_DEBUG=${OS_DEBUG:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \
OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./heat_tempest_plugin} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list
group_regex=([^\.]*\.)*

View File

@ -8,3 +8,4 @@ hacking>=2.0,<2.1.0 # Apache-2.0
# hacking to 3.2.0 or above. hacking 3.2.0 takes
# care of pyflakes version compatibilty.
pyflakes>=2.1.1
stestr>=2.0.0 # Apache-2.0

View File

@ -1,6 +1,6 @@
[tox]
envlist = py37,pep8
minversion = 3.1.1
envlist = py3,pep8
minversion = 3.18.0
skipsdist = True
ignore_basepython_conflict = True
@ -10,8 +10,7 @@ userdevelop = True
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = bash -c 'if [ ! -d ./.testrepository ] ; then testr init ; fi'
testr run {posargs}
commands = stestr run --slowest {posargs}
[testenv:pep8]
setenv =