mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-17 14:58:14 +00:00
refactor so we only check coverage in one place
This commit is contained in:
@ -31,6 +31,7 @@ from util import (
|
||||
_create_node,
|
||||
_run_node,
|
||||
_cleanup_twistd_process,
|
||||
_tahoe_runner_optional_coverage,
|
||||
)
|
||||
|
||||
|
||||
@ -158,24 +159,6 @@ def flog_gatherer(reactor, temp_dir, flog_binary, request):
|
||||
return furl
|
||||
|
||||
|
||||
def _tahoe_runner_optional_coverage(proto, reactor, request, other_args):
|
||||
"""
|
||||
Internal helper. Calls spawnProcess with `-m
|
||||
allmydata.scripts.runner` and `other_args`, optionally inserting a
|
||||
`--coverage` option if the `request` indicates we should.
|
||||
"""
|
||||
if request.config.getoption('coverage'):
|
||||
args = [sys.executable, '-m', 'coverage', 'run', '-m', 'allmydata.scripts.runner', '--coverage']
|
||||
else:
|
||||
args = [sys.executable, '-m', 'allmydata.scripts.runner']
|
||||
args += other_args
|
||||
return reactor.spawnProcess(
|
||||
proto,
|
||||
sys.executable,
|
||||
args,
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
@log_call(
|
||||
action_type=u"integration:introducer",
|
||||
|
Reference in New Issue
Block a user