Fix coverage configuration and execution

A number of configuration errors prevent the successful creation of code
coverage. This corrects the .coveragerc source/omit setup and the tox
package name generation.

Change-Id: I5329955ee1e5101fe62012c6cae91e39f0fc96e4
This commit is contained in:
Ronald Bradford 2015-10-01 15:33:18 +00:00
parent 1f49780fcf
commit 0ea635df69
4 changed files with 9 additions and 5 deletions

View File

@ -1,7 +1,8 @@
[run]
branch = True
source = reports
omit = reports/tests/*,reports/openstack/*
source = oslo_reports
omit = oslo_reports/tests/*,oslo_reports/openstack/*
[report]
ignore-errors = True
ignore_errors = True
precision = 2

1
.gitignore vendored
View File

@ -24,6 +24,7 @@ pip-log.txt
# Unit test / coverage reports
.coverage
cover
.tox
nosetests.xml
.testrepository

View File

@ -13,3 +13,5 @@ sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
oslo.config>=2.3.0 # Apache-2.0
eventlet>=0.17.4
greenlet>=0.3.2
coverage>=3.6

View File

@ -26,7 +26,7 @@ commands = {posargs}
commands = python setup.py build_sphinx
[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'
commands = python setup.py test --coverage --coverage-package-name=oslo_reports --testr-args='{posargs}'
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
@ -45,4 +45,4 @@ import_exceptions =
# this also means that pip-missing-reqs must be installed separately, outside
# of the requirements.txt files
deps = pip_missing_reqs
commands = pip-missing-reqs -d --ignore-module=oslo_reports* --ignore-module=pkg_resources --ignore-file=oslo_reports/test.py --ignore-file=oslo_reports/tests/* oslo_reports
commands = pip-missing-reqs -d --ignore-module=oslo_reports* --ignore-module=pkg_resources --ignore-file=oslo_reports/test.py --ignore-file=oslo_reports/tests/* oslo_reports