-
-
Notifications
You must be signed in to change notification settings - Fork 448
coverage fails with no-data-collected when run from tox -p auto, but not when run serially #950
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is a red herring: I've got rid of them in zopefoundation/zope.file@1e88bb9 and yet this problem persists. |
Certainly smells like subprocesses, have you pored through https://coverage.readthedocs.io/en/coverage-5.0.3/subprocess.html in great detail? Ones that often catch me:
|
I've reproduced this without subprocesses (or threads). I'm now staring at an strace log and trying to understand anything. I see a bunch of
|
Doing a |
... maybe I should strace the working process and compare? Uh, the working process opens .coverage five times. The broken one does that 19 times. Wow the line_bits representation is amazingly compact! I don't think I'll be able to extract anything useful from strace. COVERAGE_DEBUG=tracing sheds more light on this:
so that's interesting! |
coveragepy is innocent and has been unfairly framed by a bug in tox! When I run When I run |
@mgedmin I have got the same issue. Did you find a solution? |
Found the solution, for future reference in case someone is ending up here: |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I've this very weird situation:
To Reproduce
How can we reproduce the problem? Please be specific.
3.7.5, but I had the same problem with 2.7.17 (with basepython = python2.7 in the [testenv:coverage] section in tox.ini)
coverage debug sys
is helpful.5.0.3
pip freeze
is helpful.https://github.com/zopefoundation/zope.file/tree/2833ea32239f5c0d9e2f8a4f51512a2c67b32457
tox -p auto
, but limiting the test environments to just two is sufficient to reproduce this, e.g.tox -e py27,coverage -p auto
ortox -e py38,coverage -p auto
Expected behavior
96% coverage, which is what I get when I run
tox -e coverage
Additional context
There are subprocesses involved in the test script, due to zope.testrunner's feature that can run some tests in a subprocess. I'm not entirely sure how coverage tracking works with this usually.
I've tried to see if this might be a race condition due to additional system load from other tests running in parallel, but I couldn't reproduce this by running
tox -e py38 >&/dev/null & tox -e coverage
.The text was updated successfully, but these errors were encountered: