Adding a tox coverage target for fm-rest-api.

As new unit tests are being added, the coverage target
helps to view their impact.

Story: 2007082
Task: 38836
Change-Id: I2d57aac7c633ab358a2d31bfc8d8a8635931527f
Signed-off-by: albailey <Al.Bailey@windriver.com>
This commit is contained in:
albailey 2020-02-10 09:19:55 -06:00
parent dda009f4c3
commit f63603e966
2 changed files with 20 additions and 2 deletions

View File

@ -0,0 +1,8 @@
[run]
branch = True
source = fm
omit = fm/tests/*
[report]
ignore_errors = True

View File

@ -29,6 +29,16 @@ commands =
stestr run {posargs} stestr run {posargs}
stestr slowest stestr slowest
[testenv:cover]
deps = {[testenv]deps}
coverage
setenv = {[testenv]setenv}
PYTHON=coverage run --parallel-mode
commands =
coverage erase
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report