<div>Ned,</div><div> </div><div>Thank you for response. I kind of made things to work as expected by adding an extra source path:</div><div> </div><div><span style="font-family:courier new,monospace;">*/builds/*/project/src</span></div><div> </div><div>This allowed me to combine coverage from different OSes with different paths. I still don't understand, why <span style="font-family:courier new,monospace;">src</span> path didn't handle this case.</div><div> </div><div>It might be a good idea to add little bit more details on mapping files across machines to the documentation -- it'll save some time to some people :)</div><div> </div><div>Thank you.</div><div> </div><div> </div><div>05.02.2017, 07:39, "Ned Batchelder" &lt;ned@nedbatchelder.com&gt;:</div><blockquote type="cite"><div bgcolor="#FFFFFF"><p>sashk:</p><p>Send me (off-list) a copy of your .coverage data files before and after the combine step, and also the .coveragerc file. If the project is public, a link to the repo will be very helpful also.</p><p>Frankly, the mapping of files across machines still seems confusing, even to me! :)</p><p>--Ned.</p> <div>On 2/3/17 11:06 AM, sashk wrote:</div><blockquote cite="mid:10580631486138007@web26h.yandex.ru" type="cite"><div>Hello,</div><div> </div><div>I've run into issue with with coverage during combining reports step.</div><div> </div><div>My code base supports multiple operating system, so in order to get full coverage results, I need to take multiple .coverage files and combine them into single one, and then show the report.</div><div> </div><div>I use tox to run tests, so coverage finds source in the <span style="font-family:courier new,monospace;">$(pwd)/.tox/pyXX/lib/python-X.X/site-packages</span>, but when I run coverage combine and report the sources are located in the <span style="font-family:courier new,monospace;">$(pwd}/src</span>. I included both paths into my .coveragerc (see below).</div><div> </div><div>When I run <span style="font-family:courier new,monospace;">coverage report --show-missing</span>, I get bunch of errors, that it can't find sources like one below:</div><div> </div><div><div><span style="font-family:courier new,monospace;">/usr/home/gitlab-runner/builds/XXXXXXXX/0/b/project/src/project/zone2hosts.py   NoSource: No source for code: '/usr/home/gitlab-runner/builds/XXXXXXXX/0/b/project/src/project/zone2hosts.py'.</span></div><div><span style="font-family:courier new,monospace;">Aborting report output, consider using -i.</span></div><div> </div>I use gitlab-runner to run tests, and paths are different between runners. In runner above, <span style="font-family:courier new,monospace;">$(pwd)</span> part is <span style="font-family:courier new,monospace;">/home/gitlab_ci_multi_runner/builds/XXXXXXXX/0/b/src</span>, but in runner where I combine reports <span style="font-family:courier new,monospace;">$(pwd)</span> part is<span style="font-family:courier new,monospace;"> /root/src</span>. I tried -i option, as suggested by error message, but then I get blank report.</div><div> </div><div>How to make this work? What am I missing?</div><div> </div><div>my .coveragerc</div><div> </div><div><span style="font-family:courier new,monospace;">[paths]</span></div><div><span style="font-family:courier new,monospace;">source =</span></div><div><span style="font-family:courier new,monospace;">    src</span></div><div><span style="font-family:courier new,monospace;">    .tox/*/lib/python*/site-packages</span></div><div> </div><div> </div><div>Thanks,</div><div>-sashk</div><div> </div> <pre>_______________________________________________
testing-in-python mailing list
<a href="mailto:testing-in-python@lists.idyll.org">testing-in-python@lists.idyll.org</a>
<a href="http://lists.idyll.org/listinfo/testing-in-python">http://lists.idyll.org/listinfo/testing-in-python</a>
</pre></blockquote></div></blockquote>