Merge "Fix coverage report"

This commit is contained in:
Jenkins 2017-01-20 00:13:31 +00:00 committed by Gerrit Code Review
commit 48bbbe6268
3 changed files with 8 additions and 5 deletions

View File

@ -4,7 +4,7 @@ test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
OS_DEBUG=${OS_DEBUG:-0} \
python -m subunit.run discover . $LISTOPT $IDOPTION
${PYTHON:-python} -m subunit.run discover . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -12,3 +12,5 @@ oslosphinx>=4.7.0 # Apache-2.0
# releasenotes
reno>=1.8.0 # Apache-2.0
coverage>=4.0 # Apache-2.0

View File

@ -9,7 +9,7 @@ install_command = pip install -U {opts} {packages}
deps= -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands=
python setup.py testr --slowest --testr-args='{posargs}'
python setup.py test --slowest --testr-args='{posargs}'
[testenv:pep8]
commands =
@ -24,9 +24,10 @@ envdir = {toxworkdir}/venv
commands = {toxinidir}/tests/run_functests.sh {posargs}
[testenv:cover]
setenv = PYTHON=coverage run --source diskimage_builder
commands = bash -c 'if [ ! -d ./.testrepository ] ; then testr init ; fi'
bash -c 'testr run --parallel ; RET=$? ; coverage combine ; coverage html -d ./cover $OMIT && exit $RET'
# 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.
commands = python setup.py test --coverage --coverage-package-name diskimage_builder --testr-args='{posargs}'
[testenv:docs]
commands = python setup.py build_sphinx