Get the tox coverage environment to use coverage_enable_subprocess

Note `--branch` removed because it's now in the config file, where it needs to
be to be respected by subprocesses.
This commit is contained in:
Jean-Paul Calderone 2019-07-01 13:08:24 -04:00
parent 71229c3ef5
commit 3368cc216d
1 changed files with 10 additions and 1 deletions

11
tox.ini
View File

@ -54,6 +54,15 @@ commands =
py.test -v integration/
[testenv:coverage]
deps =
{[testenv]deps}
coverage_enable_subprocess==1.0
setenv =
# Point at the coveragerc file so that any Python child processes we
# launch can find it and do the kind of coverage measurement we want.
COVERAGE_PROCESS_START={env:PWD}/.coveragerc
# coverage (with --branch) takes about 65% longer to run
commands =
# As an aid to debugging, dump all of the Python packages and their
@ -63,7 +72,7 @@ commands =
# somewhat.
pip freeze
tahoe --version
coverage run --branch -m twisted.trial {env:TAHOE_LAFS_TRIAL_ARGS:--rterrors --reporter=timing} {posargs:allmydata}
coverage run -m twisted.trial {env:TAHOE_LAFS_TRIAL_ARGS:--rterrors --reporter=timing} {posargs:allmydata}
coverage xml
[testenv:codechecks]