Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #41886] [CAGE] Use lcov to show code coverage

11 views
Skip to first unread message

Paul Cochrane

unread,
Mar 17, 2007, 5:19:51 PM3/17/07
to bugs-bi...@rt.perl.org
# New Ticket Created by Paul Cochrane
# Please include the string: [perl #41886]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41886 >


The lcov tool from the Linux Test Project
(http://ltp.sourceforge.net/coverage/lcov.readme.php) can be used to
produce html output of code coverage information (I believe this looks
similar to Devel::Cover's output). A 'make cover' target should be
added to the Makefile and lcov should be run regularly over the parrot
source to help guide the testing.

Paul Johnson

unread,
Mar 18, 2007, 2:44:51 PM3/18/07
to perl6-i...@perl.org
On Sat, Mar 17, 2007 at 02:19:51PM -0700, Paul Cochrane wrote:

> The lcov tool from the Linux Test Project
> (http://ltp.sourceforge.net/coverage/lcov.readme.php) can be used to
> produce html output of code coverage information (I believe this looks
> similar to Devel::Cover's output). A 'make cover' target should be
> added to the Makefile and lcov should be run regularly over the parrot
> source to help guide the testing.

Or feel free to let Devel::Cover generate the reports. Devel::Cover
comes with a program to translate gcov output into the format that
Devel::Cover understands. This is used to generate full Perl 5 coverage
reports. See http://www.test-smoke.org/perlcover.shtml

If coverage data are available for any other languages involved in
Parrot then similar conversions should be fairly simple.

And, although I personally prefer a "make cover" target, the Perl world
seems to have settled on "make testcover".

--
Paul Johnson - pa...@pjcj.net
http://www.pjcj.net

Paul Cochrane

unread,
Mar 18, 2007, 3:07:11 PM3/18/07
to Paul Johnson, perl6-i...@perl.org
On 18/03/07, Paul Johnson <pa...@pjcj.net> wrote:
> On Sat, Mar 17, 2007 at 02:19:51PM -0700, Paul Cochrane wrote:
>
> > The lcov tool from the Linux Test Project
> > (http://ltp.sourceforge.net/coverage/lcov.readme.php) can be used to
> > produce html output of code coverage information (I believe this looks
> > similar to Devel::Cover's output). A 'make cover' target should be
> > added to the Makefile and lcov should be run regularly over the parrot
> > source to help guide the testing.
>
> Or feel free to let Devel::Cover generate the reports. Devel::Cover
> comes with a program to translate gcov output into the format that
> Devel::Cover understands. This is used to generate full Perl 5 coverage
> reports. See http://www.test-smoke.org/perlcover.shtml
>
> If coverage data are available for any other languages involved in
> Parrot then similar conversions should be fairly simple.

This is a great idea! This means we can use one tool for more parts
of the source. Thanks for pointing it out! :-)

Paul

Paul Cochrane via RT

unread,
Mar 19, 2007, 12:54:27 PM3/19/07
to perl6-i...@perl.org
On Sat Mar 17 14:19:51 2007, ptc wrote:
> The lcov tool from the Linux Test Project
> (http://ltp.sourceforge.net/coverage/lcov.readme.php) can be used to
> produce html output of code coverage information (I believe this looks
> similar to Devel::Cover's output). A 'make cover' target should be
> added to the Makefile and lcov should be run regularly over the parrot
> source to help guide the testing.

There is also a script for performing code coverage of parrot: tools/
dev/parrot_coverage.pl. The script generates html output of the code
coverage information (gleaned from gcov). Is a makefile target the
best option here, or should the script be used? It would be good to
combine the output from the C-related parts of Parrot with that of the
Perl-related parts, as pointed out by Paul Jackson.


Paul Cochrane via RT

unread,
Oct 21, 2007, 12:45:39 PM10/21/07
to perl6-i...@perl.org
On Mon Mar 19 09:54:26 2007, ptc wrote:
> On Sat Mar 17 14:19:51 2007, ptc wrote:
> > The lcov tool from the Linux Test Project
> > (http://ltp.sourceforge.net/coverage/lcov.readme.php) can be used to
> > produce html output of code coverage information (I believe this
looks
> > similar to Devel::Cover's output). A 'make cover' target should be
> > added to the Makefile and lcov should be run regularly over the
parrot
> > source to help guide the testing.

A 'make cover' target has been in trunk for a while now. All that is
required atm to close this ticket is proper integration with
Devel::Cover so that the Perl-related components could be tested for
coverage as well as the C-related components all from within the same
make target.

Paul

0 new messages