Migrate from testr to stestr
Signed-off-by: Stephen Finucane <stephenfin@sfinucan.users.ipa.redhat.com> Change-Id: I0f4a000ee4c0d54d1f1b016380ef0ca68f050854
This commit is contained in:
parent
eb2ca597f0
commit
492c33675f
26
.gitignore
vendored
26
.gitignore
vendored
@ -1,8 +1,5 @@
|
|||||||
*.py[cod]
|
*.py[cod]
|
||||||
|
|
||||||
# C extensions
|
|
||||||
*.so
|
|
||||||
|
|
||||||
# Packages
|
# Packages
|
||||||
*.egg*
|
*.egg*
|
||||||
*.egg-info
|
*.egg-info
|
||||||
@ -18,30 +15,14 @@ develop-eggs
|
|||||||
lib
|
lib
|
||||||
lib64
|
lib64
|
||||||
|
|
||||||
# Installer logs
|
|
||||||
pip-log.txt
|
|
||||||
|
|
||||||
# Unit test / coverage reports
|
# Unit test / coverage reports
|
||||||
cover/
|
cover/
|
||||||
.coverage*
|
.coverage*
|
||||||
!.coveragerc
|
!.coveragerc
|
||||||
.tox
|
.tox
|
||||||
nosetests.xml
|
.stestr
|
||||||
.testrepository
|
|
||||||
.venv
|
.venv
|
||||||
|
|
||||||
# Translations
|
|
||||||
*.mo
|
|
||||||
|
|
||||||
# Mr Developer
|
|
||||||
.mr.developer.cfg
|
|
||||||
.project
|
|
||||||
.pydevproject
|
|
||||||
|
|
||||||
# Complexity
|
|
||||||
output/*.html
|
|
||||||
output/*/index.html
|
|
||||||
|
|
||||||
# Sphinx
|
# Sphinx
|
||||||
doc/build
|
doc/build
|
||||||
|
|
||||||
@ -49,10 +30,5 @@ doc/build
|
|||||||
AUTHORS
|
AUTHORS
|
||||||
ChangeLog
|
ChangeLog
|
||||||
|
|
||||||
# Editors
|
|
||||||
*~
|
|
||||||
.*.swp
|
|
||||||
.*sw?
|
|
||||||
|
|
||||||
# Files created by releasenotes build
|
# Files created by releasenotes build
|
||||||
releasenotes/build
|
releasenotes/build
|
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
test_path=./whereto/tests
|
||||||
|
top_dir=./
|
@ -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
|
|
@ -1,10 +1,5 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
|
||||||
# process, which may cause wedges in the gate later.
|
|
||||||
|
|
||||||
hacking>=3.0.1,<3.1.0 # Apache-2.0
|
hacking>=3.0.1,<3.1.0 # Apache-2.0
|
||||||
|
|
||||||
coverage>=4.0,!=4.4 # Apache-2.0
|
coverage>=4.0,!=4.4 # Apache-2.0
|
||||||
oslotest>=1.10.0 # Apache-2.0
|
oslotest>=1.10.0 # Apache-2.0
|
||||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
|
||||||
testtools>=1.4.0 # MIT
|
testtools>=1.4.0 # MIT
|
||||||
|
stestr>=2.0.0 # Apache-2.0
|
||||||
|
50
tox.ini
50
tox.ini
@ -1,30 +1,32 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 3.1.1
|
minversion = 3.1.1
|
||||||
envlist = py38,pep8
|
envlist = py38,pep8
|
||||||
skipsdist = True
|
skipsdist = true
|
||||||
ignore_basepython_conflict = True
|
ignore_basepython_conflict = true
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
usedevelop = True
|
usedevelop = true
|
||||||
setenv =
|
setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
LANGUAGE=en_US
|
||||||
PYTHONWARNINGS=default::DeprecationWarning
|
LC_ALL=en_US.utf-8
|
||||||
|
OS_STDOUT_CAPTURE=1
|
||||||
|
OS_STDERR_CAPTURE=1
|
||||||
|
OS_TEST_TIMEOUT=60
|
||||||
|
PYTHONDONTWRITEBYTECODE=1
|
||||||
|
PYTHONWARNINGS=default::DeprecationWarning
|
||||||
deps =
|
deps =
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
python setup.py test --coverage --coverage-package-name=whereto --slowest --testr-args='{posargs}'
|
stestr run {posargs}
|
||||||
coverage report --show-missing
|
stestr slowest
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands = flake8 {posargs}
|
commands = flake8 {posargs}
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
# The sphinxcontrib.autoprogram extension requires python 3's version
|
|
||||||
# of argparse, so force python 3 here to ensure the check job that
|
|
||||||
# builds the docs on OpenStack infrastructure uses python 3.
|
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:bindep]
|
[testenv:bindep]
|
||||||
@ -32,25 +34,35 @@ deps = bindep
|
|||||||
commands = bindep test
|
commands = bindep test
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
commands = python setup.py test --coverage --testr-args='{posargs}'
|
setenv =
|
||||||
|
{[testenv]setenv}
|
||||||
|
PYTHON=coverage run --source nova --parallel-mode
|
||||||
|
commands =
|
||||||
|
coverage erase
|
||||||
|
stestr run {posargs}
|
||||||
|
coverage combine
|
||||||
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
|
coverage report
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
deps =
|
||||||
-r{toxinidir}/doc/requirements.txt
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
|
-r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
sphinx-build --keep-going -b html -W doc/source doc/build/html
|
sphinx-build -a -E -W --keep-going -b html doc/source doc/build/html
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
|
envdir = {toxworkdir}/docs
|
||||||
deps = {[testenv:docs]deps}
|
deps = {[testenv:docs]deps}
|
||||||
commands =
|
commands =
|
||||||
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
sphinx-build -a -E -W --keep-going -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
[testenv:debug]
|
[testenv:debug]
|
||||||
commands = oslo_debug_helper {posargs}
|
commands = oslo_debug_helper {posargs}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E123, E125 skipped as they are invalid PEP-8.
|
# E123, E125 skipped as they are invalid PEP-8.
|
||||||
|
|
||||||
show-source = True
|
show-source = True
|
||||||
ignore = E123,E125
|
ignore = E123,E125
|
||||||
builtins = _
|
builtins = _
|
||||||
|
Loading…
Reference in New Issue
Block a user