Reuse test commands in cover target

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

Also install coverage only when needed.

Change-Id: I3bad06ca26524ec7125495fa38d1912930ef5ca9
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami committed 2026-10-03 10:35:20 +09:00
1 parent ca0f66e0f6
commit 0ef5392dac
2 files changed
+7 -6

No files matched your search

+1 -2
View File
@@ -1,6 +1,5 @@
testtools>=1.4.0 # MIT
coverage>=5.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
pifpaf>=0.10.0 # Apache-2.0
stestr>=2.0.0
stestr>=2.0.0 # Apache-2.0
requests>=2.10.0 # Apache-2.0
+6 -4
View File
@@ -33,8 +33,6 @@ allowlist_externals =
{toxinidir}/run-tests.sh
commands =
{toxinidir}/run-tests.sh stestr run "{posargs}"
passenv =
ETCD_VERSION
[testenv:venv]
# This target is used by the gate go run Sphinx to build the doc
@@ -48,11 +46,15 @@ commands =
{toxinidir}/run-examples.sh
[testenv:cover]
setenv = {[testenv]setenv}
setenv =
{[testenv]setenv}
PYTHON=coverage run --source tooz --parallel-mode
deps =
{[testenv]deps}
coverage>=5.0 # Apache-2.0
commands =
coverage erase
{toxinidir}/run-tests.sh stestr run "{posargs}"
{[testenv]commands}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml