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] [run]
branch = True branch = True
source = versionedobjects source = oslo_versionedobjects
omit = versionedobjects/tests/*,versionedobjects/openstack/* omit = oslo_versionedobjects/tests/*,versionedobjects/openstack/*
[report] [report]
ignore_errors = True ignore_errors = True
precision = 2

3
.gitignore vendored
View File

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

View File

@ -7,3 +7,5 @@ testtools>=1.4.0
# These are needed for docs generation # These are needed for docs generation
oslosphinx>=2.5.0 # Apache-2.0 oslosphinx>=2.5.0 # Apache-2.0
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 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 commands = python setup.py build_sphinx
[testenv:cover] [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] [flake8]
# E123, E125 skipped as they are invalid PEP-8. # E123, E125 skipped as they are invalid PEP-8.