﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	launchpad_bug
2297	improve precision of coverage reports by including coverage by subprocesses	daira		"Currently, coverage reports underestimate covered code in some places (this particularly affects the code for starting nodes) because only Python code directly executed by `coverage run` is measured.

`coverage` has a feature to measure the code running in multiple processes and then combine the measurements:

http://nedbatchelder.com/code/coverage/subprocess.html
http://nedbatchelder.com/code/coverage/cmd.html#cmd-combining

To make this work, we need to:

* Run this early on when starting Tahoe processes (e.g. in [source:src/allmydata/__init__.py]):
{{{
try:
    from coverage import process_startup
    process_startup()
except ImportError:
    pass
}}}

* Set the `COVERAGE_PROCESS_START` environment variable (which will be inherited by subprocesses) when running `coverage` from [source:setup.py] and the [source:Makefile].

* Pass the `-p` option to the `coverage` command line.

* Ensure that the `.coverage.*` files are being generated in the same directory.

* After `coverage run`, execute `coverage combine`."	defect	new	normal	undecided	code	1.10.0		coverage subprocess		
