Fix coverage usage

Signed-off-by: Chuck Short <chuck.short@canonical.com>
This commit is contained in:
Chuck Short 2016-01-19 12:33:18 -05:00
parent cffa9089f1
commit 2fc158e5e8
4 changed files with 12 additions and 8 deletions

View File

@ -1,7 +1,7 @@
[run]
branch = True
source = nova_lxd
omit = nova_lxd/tests/*
[report]
ignore-errors = True
omit = nova_lxd/tests/*
ignore_errors = True

View File

@ -1,7 +1,8 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
t_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
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-160} \
${PYTHON:-python} -m subunit.run discover -t \
./${OS_TEST_PATH:-./nova_lxd/tests} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list
test_list_option=--list

View File

@ -15,5 +15,6 @@ testrepository>=0.0.18
testscenarios>=0.4
testtools>=1.4.0
os-testr>=0.4.1
nosexcover
-e git+https://github.com/lxc/pylxd#egg=pylxd
-e git+https://github.com/openstack/nova#egg=nova

View File

@ -23,7 +23,9 @@ commands = flake8
commands = {posargs}
[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
commands = nosetests --with-xcoverage --cover-package=nova_lxd --cover-tests
[testenv:docs]
commands = python setup.py build_sphinx