Browse Source

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
changes/11/510011/1
Pavlo Shchelokovskyy 4 years ago
parent
commit
60e0ea26fb
  1. 1
      .gitignore
  2. 3
      .stestr.conf
  3. 5
      .testr.conf
  4. 13
      tox.ini

1
.gitignore

@ -25,6 +25,7 @@ develop-eggs
# Other
*.DS_Store
.stestr
.testrepository
.tox
.idea

3
.stestr.conf

@ -0,0 +1,3 @@
[DEFAULT]
test_path=${TESTS_DIR:-./ironicclient/tests/unit}
top_dir=./

5
.testr.conf

@ -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

@ -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…
Cancel
Save