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: Ie55159304b8633acd6b06ba94d0cb8507a337504
This commit is contained in:
Ronald Bradford 2015-10-01 19:54:59 +00:00
parent 825434ddab
commit 9393cd451c
4 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,8 @@
[run]
branch = True
source = versionedobjects
omit = versionedobjects/tests/*,versionedobjects/openstack/*
source = oslo_versionedobjects
omit = oslo_versionedobjects/tests/*,versionedobjects/openstack/*
[report]
ignore_errors = True
precision = 2

3
.gitignore vendored
View File

@ -4,7 +4,7 @@
*.so
# Packages
*.egg
*.egg*
*.egg-info
dist
build
@ -23,6 +23,7 @@ pip-log.txt
# Unit test / coverage reports
.coverage
cover
.tox
nosetests.xml
.testrepository

View File

@ -7,3 +7,5 @@ testtools>=1.4.0
# These are needed for docs generation
oslosphinx>=2.5.0 # Apache-2.0
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.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_versionedobjects --testr-args='{posargs}'
[flake8]
# E123, E125 skipped as they are invalid PEP-8.