<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 4/4/20 10:34 AM, Skip Montanaro
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CANc-5UyXXf5=LWxUm6kgFQ0Xk0qJSm9VsANE4RH=mWsKVJ91eA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Is your run_tests.py
executing 'python ... -m test ...' in a subprocess?<br>
<br>
Have you done the necessary groundwork to enable
multi-process coverage<br>
tracking? I think not -- I don't see '-p' passed to
'coverage run', nor<br>
a 'coverage combine' command in your Makefile.<br>
<br>
Do check the documentation:<br>
- <a
href="https://coverage.readthedocs.io/en/latest/subprocess.html"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://coverage.readthedocs.io/en/latest/subprocess.html</a>
(which<br>
page surprises me by not mentioning 'coverage combine',
TBH)<br>
- <a
href="https://coverage.readthedocs.io/en/latest/cmd.html#combining-data-files"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://coverage.readthedocs.io/en/latest/cmd.html#combining-data-files</a></blockquote>
<div><br>
</div>
<div class="gmail_default"
style="font-family:arial,sans-serif">Thanks for your help,
Marius. I'm still stuck, however. I read the docs, replaced
-a with -p and created a sitecustomize.py file in my
checkout's Lib directory. Despite exiting with a zero
status, this command:</div>
<div class="gmail_default"
style="font-family:arial,sans-serif"><br>
</div>
</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div class="gmail_quote">
<div class="gmail_default"
style="font-family:arial,sans-serif">~/.local/bin/coverage
run -p --source=${PWD}/Lib/rattlesnake
./Tools/scripts/run_tests.py test_rattlesnake</div>
</div>
</blockquote>
<div class="gmail_quote">
<div class="gmail_default"
style="font-family:arial,sans-serif"><br>
</div>
<div class="gmail_default"
style="font-family:arial,sans-serif">produces no
.coverage.HOSTNAME.PID.RANDOM file. This however does:</div>
<div class="gmail_default"
style="font-family:arial,sans-serif"><br>
</div>
</div>
<blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div class="gmail_quote">
<div class="gmail_default"
style="font-family:arial,sans-serif">~/.local/bin/coverage
run -p --source=${PWD}/Lib/rattlesnake $(HOME)/tmp/junk.py</div>
</div>
</blockquote>
<div class="gmail_quote">
<div class="gmail_default"
style="font-family:arial,sans-serif"><br>
</div>
<div class="gmail_default"
style="font-family:arial,sans-serif">The lack of any
coverage data from running the unit test would seem to be at
the root of my problem.</div>
</div>
</div>
</blockquote>
<p><br>
</p>
<p>You need to also define the environment variable
COVERAGE_PROCESS_START to point to the .coveragerc file to use.
You haven't mentioned it, so perhaps this is what is missing?</p>
<p>--Ned.<br>
</p>
</body>
</html>