Switch to stestr

Most of the OpenStack projects have switched to stestr, mostly due
to the fact that testrepository seems to be unmaintained.

We'll do the same for oswin-tempest-plugin, especially since
testrepository no longer handles skip exceptions properly, treating
them as failures.

Change-Id: I27a20bad68fef9f19d46eea4aefcd7e4998fe838
This commit is contained in:
Lucian Petrut 2020-02-21 15:38:27 +02:00
parent a291a1b471
commit 0108a120e8
5 changed files with 6 additions and 10 deletions

2
.gitignore vendored
View File

@ -27,7 +27,7 @@ cover/
!.coveragerc
.tox
nosetests.xml
.testrepository
.stestr
.venv
# Translations

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=${OS_TEST_PATH:-./oswin_tempest_plugin/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 -t ./ . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -7,9 +7,9 @@ hacking<0.13,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD
sphinx!=1.6.6,>=1.6.2 # BSD
stestr>=2.0.0 # Apache-2.0
oslosphinx>=4.7.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT

View File

@ -14,7 +14,7 @@ setenv =
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python setup.py test --slowest --testr-args='{posargs}'
commands = stestr run --slowest {posargs}
[testenv:pep8]
basepython = python3