Use .coveragerc file

... instead of defining the omit options multiple times.

Change-Id: I14c921454dd50854da64bd1ed039d0cdcbb27f75
This commit is contained in:
Takashi Kajinami 2024-02-02 23:17:12 +09:00
parent 9050f66a1b
commit 055224c5e2
2 changed files with 10 additions and 3 deletions

7
.coveragerc Normal file
View File

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

View File

@ -62,13 +62,13 @@ commands =
[testenv:cover]
setenv = {[testenv]setenv}
PYTHON=coverage run --source ironic --omit='*tests*' --parallel-mode
PYTHON=coverage run --source ironic --parallel-mode
commands =
coverage erase
stestr run --parallel-class {posargs}
coverage combine
coverage report --omit='*tests*'
coverage html -d ./cover --omit='*tests*'
coverage report
coverage html -d ./cover
[testenv:genconfig]
sitepackages = False