Reuse test commands in cover target

... to maintain the commands in a single place.

Also install coverage only when needed.

Change-Id: Ic6a13198bfb8be593d9fce077eedae2610bebc5c
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami committed 2026-10-03 10:26:44 +09:00
1 parent eed19e077c
commit d47eec9051
2 files changed
+4 -2

No files matched your search

-1
View File
@@ -1,4 +1,3 @@
coverage>=5.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
# sphinx is needed for testing the sphinxext module
sphinx>=2.0.0 # BSD
+4 -1
View File
@@ -38,9 +38,12 @@ commands =
[testenv:cover]
setenv =
PYTHON=coverage run --source stevedore --parallel-mode
deps =
{[testenv]deps}
coverage>=5.0 # Apache-2.0
commands =
coverage erase
stestr run {posargs}
{[testenv]commands}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml