Replace testr with stestr
os-testr 1.0.0 now uses stestr as underlying test runner, so we should re-configure our testing setup accordingly. Change-Id: I0a8f23cf2bd934c288daf1a9fa8b672768641163
This commit is contained in:
parent
a283a3ed58
commit
60e0ea26fb
1
.gitignore
vendored
1
.gitignore
vendored
@ -25,6 +25,7 @@ develop-eggs
|
||||
|
||||
# Other
|
||||
*.DS_Store
|
||||
.stestr
|
||||
.testrepository
|
||||
.tox
|
||||
.idea
|
||||
|
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
||||
[DEFAULT]
|
||||
test_path=${TESTS_DIR:-./ironicclient/tests/unit}
|
||||
top_dir=./
|
@ -1,5 +0,0 @@
|
||||
[DEFAULT]
|
||||
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ${TESTS_DIR:-./ironicclient/tests/unit} $LISTOPT $IDOPTION
|
||||
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
13
tox.ini
13
tox.ini
@ -7,7 +7,7 @@ skipsdist = True
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
PYTHONDONTWRITEBYTECODE = 1
|
||||
LANGUAGE=en_US
|
||||
# .testr.conf uses TESTS_DIR
|
||||
# .stestr.conf uses TESTS_DIR
|
||||
TESTS_DIR=./ironicclient/tests/unit
|
||||
usedevelop = True
|
||||
install_command =
|
||||
@ -27,11 +27,14 @@ commands =
|
||||
doc8 doc/source CONTRIBUTING.rst README.rst
|
||||
|
||||
[testenv:cover]
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
LANGUAGE=en_US
|
||||
setenv = {[testenv]setenv}
|
||||
PYTHON=coverage run --source ironicclient --omit='*tests*' --parallel-mode
|
||||
commands =
|
||||
coverage erase
|
||||
python setup.py testr --coverage --testr-args='{posargs}'
|
||||
coverage erase
|
||||
ostestr {posargs}
|
||||
coverage combine
|
||||
coverage report --omit='*tests*'
|
||||
coverage html -d ./cover --omit='*tests*'
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
Loading…
Reference in New Issue
Block a user