Reuse test commands in cover target

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

Also install coverage only when needed.

Change-Id: I467ccc1485d04edbeb70944b871c4f477e719169
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami committed 2026-10-03 10:46:05 +09:00
1 parent 60ce00bc48
commit 4118eb8b52
2 files changed
+4 -2

No files matched your search

-1
View File
@@ -1,3 +1,2 @@
stestr>=3.0.1 # Apache-2.0
coverage>=5.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
+4 -1
View File
@@ -29,9 +29,12 @@ commands = {posargs}
[testenv:cover]
setenv =
PYTHON=coverage run --source cursive --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