This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: lcov report
Type: enhancement Stage: resolved
Components: Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: belopolsky, brett.cannon, christian.heimes, python-dev
Priority: low Keywords: patch

Created on 2013-07-17 14:40 by christian.heimes, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
lcov.patch christian.heimes, 2013-07-17 19:48 review
Messages (12)
msg193230 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-17 14:40
The patch adds a couple of ignores and three Makefile targets for gcov and lcov reports. lcov [1] is a project that can create html reports from gcov output for C files.

make coverage-report first cleans up the source tree, then recompiles Python with gcov, runs the unit test and finally creates a HTML report.

I have a sample output on my box. Do we have a server where I can host about 55 MB?

[1] http://ltp.sourceforge.net/coverage/lcov.php
msg193244 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-17 19:48
The new patch removes 3rd party components like expat and libffi. lcov doesn't support complex matches so I had to remove each library on its own.
msg193869 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-29 14:34
I have moved the static pages to bitbucket:

  http://tiran.bitbucket.org/python-lcov/
msg193885 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-07-29 17:53
How much slower is the execution of Python under the coverage? And can you run it with regrtest's -j (I assume not, but I thought I would ask)?

I'm asking because this would be interesting to try and tie into devinabox, but having to run two multi-hour testing runs might be a bit much to ask of sprint leaders.
msg193886 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-29 18:14
I'm using the PSF's virtual machine for Coverity Scan to run the lcov tests. A full configure (without pydebug), build, test and analyze cycle takes about 25 to 30 minutes. I'm not sure if gcov supports multiple processes.

Maybe we can set up a service that builds C and Py coverage reports once a day? The service could push the reports to a public web site and offer rsync pulls over ssh for developers.
msg193890 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-07-29 19:37
My long term hope is something exactly like that. I'm about to rewrite the instructions for handling coverage.py to use a venv for devinabox, but it's definitely something that can be entirely automated for a daily report.
msg193891 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-07-29 19:37
And I should part of the reason I would love a daily report is it currently takes a couple of hours to run a full coverage report and that's without branch coverage.
msg193894 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-29 20:08
Yeah, it's horrible slow. We need something like https://bitbucket.org/ned/coveragepy/src/2c5fb3a8b81cc56d8ad57dd1bd83ef7740f0d65d/coverage/tracer.c?at=default in the core. I already talked to Ned about contributing the module.
msg193912 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2013-07-30 02:07
It's actually slower even with tracer.c. You actually can't use the full coverage script without using the tracer extension module.
msg193962 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-07-30 22:55
New changeset 85ec2b5bfcd2 by Christian Heimes in branch 'default':
Issue #18481: Add C coverage reporting with gcov and lcov. A new make target
http://hg.python.org/cpython/rev/85ec2b5bfcd2
msg193963 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-07-30 23:17
New changeset 116b05b98bea by Christian Heimes in branch 'default':
Issue #18481: document new C coverage make targets
http://hg.python.org/devguide/rev/116b05b98bea
msg193964 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-30 23:19
I have add two new make targets and documented the new stuff in our devguide. I'm going to run and upload the report every now and then.
History
Date User Action Args
2022-04-11 14:57:48adminsetgithub: 62681
2013-07-30 23:19:56christian.heimessetstatus: open -> closed
resolution: fixed
messages: + msg193964

stage: patch review -> resolved
2013-07-30 23:17:13python-devsetmessages: + msg193963
2013-07-30 22:55:30python-devsetnosy: + python-dev
messages: + msg193962
2013-07-30 02:07:16brett.cannonsetmessages: + msg193912
2013-07-29 20:08:58christian.heimessetmessages: + msg193894
2013-07-29 19:37:56brett.cannonsetmessages: + msg193891
2013-07-29 19:37:20brett.cannonsetmessages: + msg193890
2013-07-29 18:14:29christian.heimessetmessages: + msg193886
2013-07-29 17:59:13belopolskysetnosy: + belopolsky
2013-07-29 17:53:19brett.cannonsetnosy: + brett.cannon
messages: + msg193885
2013-07-29 14:34:02christian.heimessetmessages: + msg193869
2013-07-29 14:33:31christian.heimessetmessages: - msg193235
2013-07-17 19:49:44christian.heimessetfiles: - lcov.patch
2013-07-17 19:48:46christian.heimessetfiles: + lcov.patch

messages: + msg193244
2013-07-17 15:48:32christian.heimessetmessages: + msg193235
2013-07-17 14:40:36christian.heimescreate