Migrate from testr to stestr, disable auto discovery

Change-Id: I4cf10643a18fbc331213b5a3f3d4e4f207f49527
(cherry picked from commit 66f8964f59)
                and commit 1e3b5a1cd4)
(cherry picked from commit 1d32a9bc44)
This commit is contained in:
Jiri Podivin 2022-03-29 08:57:50 +02:00 committed by Luca Miccini
parent c04cfea241
commit 24c4a940e7
6 changed files with 19 additions and 14 deletions

16
.gitignore vendored
View File

@ -1,13 +1,23 @@
*~
.testrepository
*.sw?
*.pyc
.testrepository
# Unit test / coverage reports
.stestr
.tox
.venv
# Packages
*.egg-info
dist
build
# pbr generates these
AUTHORS
ChangeLog
# Editors
*.sw?
*~
# Files created by releasenotes build
releasenotes/build

3
.stestr.conf Normal file
View File

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

View File

@ -1,8 +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:-160} \
${PYTHON:-python} -m subunit.run discover -t ./ ./tests $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -19,4 +19,5 @@ import setuptools
setuptools.setup(
setup_requires=['pbr'],
py_modules=[],
pbr=True)

View File

@ -7,7 +7,7 @@ oslotest
sphinx>=2.0.0,!=2.1.0 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0
testrepository>=0.0.18
stestr>=2.0.0 # Apache-2.0
# This is required for the releasenotes build jobs
reno>=3.1.0 # Apache-2.0

View File

@ -11,8 +11,7 @@ deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/victoria}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands=
python setup.py testr --slowest --testr-args='{posargs}'
commands = stestr run --slowest {posargs}
[testenv:venv]
commands = {posargs}