Coverage data seems to get lost, maybe
Summary
When running tests and viewing the output, you can see warnings from coverage.py:
Coverage.py warning: No data was collected. (no-data-collected)
Related: upstream pytest-cov issue
Steps to reproduce
Run the tests and view the output with -s, for example:
tox -e py36 -- -e tests/frontend/buildcheckout.py
What is the current bug behavior?
Warnings about coverage not being collected are being shown a lot while BuildStream is running, almost once per child task launched.
What is the expected correct behavior?
No warnings.
Relevant logs and/or screenshots
I have a sample log but it's big, the part you're looking for is:
...
[--:--:--][f58a8949][fetch:build-test-bzr.bst ] START test/build-test-bzr/f58a8949-fetch.26118.log
[--:--:--][f58a8949][fetch:build-test-bzr.bst ] START Fetching file:///codethink/GNOME/buildstream/.tox/py35/tmp/test_fetch_build_checkout_stri1/repo
[00:00:00][f58a8949][fetch:build-test-bzr.bst ] SUCCESS Fetching file:///codethink/GNOME/buildstream/.tox/py35/tmp/test_fetch_build_checkout_stri1/repo
[00:00:00][f58a8949][fetch:build-test-bzr.bst ] SUCCESS test/build-test-bzr/f58a8949-fetch.26118.log
Coverage.py warning: No data was collected. (no-data-collected)
[--:--:--][f58a8949][build:build-test-bzr.bst ] START test/build-test-bzr/f58a8949-build.26141.log
[--:--:--][f58a8949][build:build-test-bzr.bst ] START Staging sources
[00:00:00][f58a8949][build:build-test-bzr.bst ] SUCCESS Staging sources
[--:--:--][f58a8949][build:build-test-bzr.bst ] START Caching artifact
[00:00:00][f58a8949][build:build-test-bzr.bst ] SUCCESS Caching artifact
[00:00:00][f58a8949][build:build-test-bzr.bst ] SUCCESS test/build-test-bzr/f58a8949-build.26141.log
Coverage.py warning: No data was collected. (no-data-collected)
[00:00:00][][] SUCCESS Build
Other relevant information
It's unclear how long this has been happening, after migrating to tox and ironing out the coverage integration, we have the same coverage as before at around 86%.
Is it possible that we have not been counting code which runs in child processes in the coverage reports ?