Fix and unify cover environment

Fix cover environment and unify it accordingly to Project Testing
Interface [1].

[1] https://governance.openstack.org/tc/reference/pti/python.html#coverage-jobs

Change-Id: I24335128cb3566e4104ddc6dad9a53f1a5ec249b
This commit is contained in:
Martin Chacon Piza 2020-05-27 18:29:17 +02:00
parent a5b0cbe021
commit f519f2d67e
2 changed files with 8 additions and 5 deletions

2
.gitignore vendored
View File

@ -14,7 +14,7 @@ dist
.testrepository/
.stestr/
.coverage.*
.coverage
cover/
*.sample

11
tox.ini
View File

@ -26,11 +26,14 @@ commands =
stestr run {posargs}
[testenv:cover]
description = Calculates code coverage
setenv =
PYTHON=coverage run --source monasca_notification --parallel-mode
commands =
coverage erase
python setup.py test --coverage --testr-args='{posargs}' \
--coverage-package-name=monasca_notification
coverage report
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:debug]
commands =