Migrate from testr to stestr
* Replace .testr.conf by .stestr.conf for migration and update .gitignore, test-requirements.txt and lower-constraints.txt files accordingly * Use py3 as the default runtime and 3.18.0 as the minversion for tox * Add group_regex to run all tests Signed-off-by: HeroicHitesh <email.hiteshkumar@gmail.com> Change-Id: I704356082e2c25d21aff3c5433efa077259b0b1d
This commit is contained in:
parent
280d9232c6
commit
687a3127d3
41
.gitignore
vendored
41
.gitignore
vendored
@ -1,17 +1,5 @@
|
|||||||
.coverage
|
|
||||||
coverage.xml
|
|
||||||
cover/*
|
|
||||||
doc/source/developer/api/
|
doc/source/developer/api/
|
||||||
*~
|
|
||||||
.testrepository
|
|
||||||
*.sw?
|
|
||||||
#*#
|
|
||||||
*.pyc
|
*.pyc
|
||||||
.tox
|
|
||||||
*.egg
|
|
||||||
*.egg-info
|
|
||||||
*.eggs
|
|
||||||
dist
|
|
||||||
*.qcow2
|
*.qcow2
|
||||||
*.raw
|
*.raw
|
||||||
*.initrd
|
*.initrd
|
||||||
@ -19,9 +7,30 @@ dist
|
|||||||
/*-manifests
|
/*-manifests
|
||||||
/*.d
|
/*.d
|
||||||
!/.zuul.d
|
!/.zuul.d
|
||||||
build
|
|
||||||
AUTHORS
|
|
||||||
ChangeLog
|
|
||||||
bin/diskimage_builder
|
|
||||||
*.bak
|
*.bak
|
||||||
*.orig
|
*.orig
|
||||||
|
|
||||||
|
# Packages
|
||||||
|
*.egg*
|
||||||
|
*.egg-info
|
||||||
|
dist
|
||||||
|
build
|
||||||
|
eggs
|
||||||
|
bin/diskimage_builder
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
cover/
|
||||||
|
.coverage*
|
||||||
|
coverage.xml
|
||||||
|
!.coveragerc
|
||||||
|
.tox
|
||||||
|
.stestr/
|
||||||
|
.venv
|
||||||
|
|
||||||
|
# pbr generates these
|
||||||
|
AUTHORS
|
||||||
|
ChangeLog
|
||||||
|
|
||||||
|
# Editors
|
||||||
|
*~
|
||||||
|
*.sw?
|
4
.stestr.conf
Normal file
4
.stestr.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
test_path=./diskimage_builder/
|
||||||
|
group_regex=diskimage_builder.(tests|elements|block_device)
|
||||||
|
top_dir=./
|
10
.testr.conf
10
.testr.conf
@ -1,10 +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_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
|
|
||||||
OS_DEBUG=${OS_DEBUG:-1} \
|
|
||||||
${PYTHON:-python} -m subunit.run discover . $LISTOPT $IDOPTION
|
|
||||||
test_id_option=--load-list $IDFILE
|
|
||||||
test_list_option=--list
|
|
||||||
|
|
@ -39,7 +39,7 @@ snowballstemmer==1.2.1
|
|||||||
Sphinx==1.6.2
|
Sphinx==1.6.2
|
||||||
sphinxcontrib-websupport==1.0.1
|
sphinxcontrib-websupport==1.0.1
|
||||||
stevedore==1.20.0
|
stevedore==1.20.0
|
||||||
testrepository==0.0.18
|
stestr==2.0.0
|
||||||
testtools==2.2.0
|
testtools==2.2.0
|
||||||
traceback2==1.4.0
|
traceback2==1.4.0
|
||||||
unittest2==1.1.0
|
unittest2==1.1.0
|
||||||
|
@ -7,7 +7,7 @@ pylint>=1.7.1 #GPLv2
|
|||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
mock>=2.0.0 # BSD
|
mock>=2.0.0 # BSD
|
||||||
oslotest>=3.2.0 # Apache-2.0
|
oslotest>=3.2.0 # Apache-2.0
|
||||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
stestr>=2.0.0 # Apache-2.0
|
||||||
testtools>=2.2.0 # MIT
|
testtools>=2.2.0 # MIT
|
||||||
|
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
|
24
tox.ini
24
tox.ini
@ -1,6 +1,6 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = pep8,pylint,py35,py36,py37,py38
|
envlist = pep8,pylint,py3
|
||||||
minversion = 3.2.1
|
minversion = 3.18.0
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
ignore_basepython_conflict = True
|
ignore_basepython_conflict = True
|
||||||
|
|
||||||
@ -11,8 +11,7 @@ deps=
|
|||||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands=
|
commands= stestr run --slowest {posargs}
|
||||||
python setup.py test --slowest --testr-args='{posargs}'
|
|
||||||
passenv=
|
passenv=
|
||||||
DUMP_CONFIG_GRAPH
|
DUMP_CONFIG_GRAPH
|
||||||
|
|
||||||
@ -36,11 +35,18 @@ envdir = {toxworkdir}/venv
|
|||||||
commands = {toxinidir}/tests/run_functests.sh {posargs}
|
commands = {toxinidir}/tests/run_functests.sh {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
# NOTE: this is "setup.py test" (*not* testr) which is a pbr wrapper
|
|
||||||
# around testr. This understands --coverage-package-name which we
|
|
||||||
# need due to underscore issues.
|
|
||||||
basepython = python3
|
basepython = python3
|
||||||
commands = python setup.py test --coverage --coverage-package-name diskimage_builder --testr-args='{posargs}'
|
allowlist_externals = find
|
||||||
|
setenv =
|
||||||
|
PYTHON=coverage run --source diskimage_builder --parallel-mode
|
||||||
|
commands =
|
||||||
|
coverage erase
|
||||||
|
find . -type f -name "*.pyc" -delete
|
||||||
|
stestr run {posargs}
|
||||||
|
coverage combine
|
||||||
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
|
coverage report
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
deps=
|
deps=
|
||||||
@ -48,7 +54,7 @@ deps=
|
|||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
-r{toxinidir}/doc/requirements.txt
|
-r{toxinidir}/doc/requirements.txt
|
||||||
basepython = python3
|
basepython = python3
|
||||||
whitelist_externals =
|
allowlist_externals =
|
||||||
rm
|
rm
|
||||||
commands =
|
commands =
|
||||||
rm -rf doc/build
|
rm -rf doc/build
|
||||||
|
Loading…
Reference in New Issue
Block a user