Fix coverage report generation

Coverage is a little bit confused by oslo.messaging as the pypi package
name. So we have to be explicit here or we get no data collection.

Adding a .coveragerc helps give the report more context as we don't
care about coverage in the tests or oslo-incubator.

Change-Id: I3d24187890efd7aecad7fcb7a2974b87e89ef6ff
This commit is contained in:
Clint Byrum 2015-03-12 13:45:11 -07:00
parent 4a3540599e
commit 0f87f5cb15
2 changed files with 8 additions and 1 deletions

7
.coveragerc Normal file
View File

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

View File

@ -15,7 +15,7 @@ commands = flake8
[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
commands =
python setup.py testr --coverage
python setup.py test --coverage --coverage-package-name=oslo_messaging --testr-args='{posargs}'
[testenv:venv]
commands = {posargs}