Reuse test commands in cover target

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

Also install coverage only when needed.

Change-Id: Ib9dddbb40f309c80b39092751912f472883ab14a
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami committed 2026-10-04 02:06:06 +09:00
1 parent 4640936ca0
commit 6f437054da
2 files changed
+4 -2

No files matched your search

-1
View File
@@ -1,4 +1,3 @@
coverage>=5.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
pifpaf>=0.10.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
+4 -1
View File
@@ -67,9 +67,12 @@ commands =
[testenv:cover]
setenv =
PYTHON=coverage run --source oslo_cache --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