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: I045d46d74809e506bcd94deaefc5477461616071
This commit is contained in:
Martin Chacon Piza 2020-05-27 18:14:09 +02:00
parent 738bd43559
commit a99d2f063a
1 changed files with 7 additions and 4 deletions

11
tox.ini
View File

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