Switch to use stestr for unit test
According to Openstack summit session [1], stestr is maintained project to which all Openstack projects should migrate. So we should switch to stestr. [1] https://etherpad.openstack.org/p/YVR-python-pti Change-Id: I33e075b3b7f2eec889cd1698edaab5ee89f69121
This commit is contained in:
parent
3da9679d9b
commit
49a2a95fad
2
.gitignore
vendored
2
.gitignore
vendored
@ -27,7 +27,7 @@ cover/
|
|||||||
!.coveragerc
|
!.coveragerc
|
||||||
.tox
|
.tox
|
||||||
nosetests.xml
|
nosetests.xml
|
||||||
.testrepository
|
.stestr/
|
||||||
.venv
|
.venv
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
|
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
test_path=./release_test/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
|
|
@ -9,7 +9,7 @@ python-subunit>=0.0.18
|
|||||||
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
|
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
|
||||||
oslosphinx>=2.5.0 # Apache-2.0
|
oslosphinx>=2.5.0 # Apache-2.0
|
||||||
oslotest>=1.10.0 # Apache-2.0
|
oslotest>=1.10.0 # Apache-2.0
|
||||||
testrepository>=0.0.18
|
stestr>=2.0.0 # Apache-2.0
|
||||||
testscenarios>=0.4
|
testscenarios>=0.4
|
||||||
testtools>=1.4.0
|
testtools>=1.4.0
|
||||||
reno>=0.1.1 # Apache2
|
reno>=0.1.1 # Apache2
|
||||||
|
11
tox.ini
11
tox.ini
@ -11,7 +11,7 @@ deps =
|
|||||||
-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=oslo_config --slowest --testr-args='{posargs}'
|
python setup.py test --coverage --coverage-package-name=oslo_config --slowest {posargs}
|
||||||
coverage report --show-missing
|
coverage report --show-missing
|
||||||
|
|
||||||
[testenv:py27]
|
[testenv:py27]
|
||||||
@ -27,7 +27,14 @@ commands = {posargs}
|
|||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
commands = python setup.py test --coverage --testr-args='{posargs}'
|
setenv =
|
||||||
|
{[testenv]setenv}
|
||||||
|
PYTHON=coverage run --source release_test --parallel-mode
|
||||||
|
commands =
|
||||||
|
stestr run {posargs}
|
||||||
|
coverage combine
|
||||||
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user