Merge "Add stestr-specific files"

This commit is contained in:
Jenkins 2017-09-25 13:48:51 +00:00 committed by Gerrit Code Review
commit de2992c95b
5 changed files with 14 additions and 10 deletions

1
.gitignore vendored
View File

@ -27,6 +27,7 @@ cover
.tox
nosetests.xml
.testrepository
.stestr
.venv
# Translations

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=.
top_dir=./

View File

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

View File

@ -11,7 +11,6 @@ python-subunit>=0.0.18 # Apache-2.0/BSD
sphinx>=1.6.2 # BSD
oslosphinx>=4.7.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
os-testr>=1.0.0 # Apache-2.0

12
tox.ini
View File

@ -26,10 +26,18 @@ commands =
commands = {posargs}
[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE = 1
LANGUAGE=en_US
LC_ALL=en_US.UTF-8
TESTS_DIR=./ironic_staging_drivers/tests/unit/
PYTHON=coverage run --source ironic_staging_drivers --omit='*tests*' --parallel-mode
commands =
coverage erase
python setup.py test --coverage --omit '*test*' --coverage-package-name ironic_staging_drivers --testr-args='{posargs}'
coverage report --omit='*test*'
ostestr {posargs}
coverage combine
coverage report --omit='*tests*'
coverage html -d ./cover --omit='*tests*'
[testenv:docs]
commands = python setup.py build_sphinx