From: Nicholas Clark Date: Sat, 17 Sep 2005 14:33:33 +0000 (+0000) Subject: Add "automating coverage tests" as a TODO X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=30222c0f41971add379ea16c00a07c51f510eb5d;p=p5sagit%2Fp5-mst-13.2.git Add "automating coverage tests" as a TODO p4raw-id: //depot/perl@25430 --- diff --git a/pod/perltodo.pod b/pod/perltodo.pod index 7f4d55f..0ae7aea 100644 --- a/pod/perltodo.pod +++ b/pod/perltodo.pod @@ -49,6 +49,7 @@ See F for the 3 remaining modules that need tests. Use Devel::Cover to ascertain the core's test coverage, then add tests that are currently missing. + =head2 test B A full test suite for the B module would be nice. @@ -136,6 +137,69 @@ the system does compressed man pages (same directory/different directory? same filename/different filename), as well as tweaking the F script to compress as necessary. +=head2 Add a code coverage target to the Makefile + +Make it easy for anyone to run Devel::Cover on the core's tests. The steps +to do this manually are roughly + +=over 4 + +=item * + +do a normal C, but include Devel::Cover as a module to install +(see F for how to do this) + +=item * + + make perl + +=item * + + cd t; HARNESS_PERL_SWITCHES=-MDevel::Cover ./perl -I../lib harness + +=item * + +Process the resulting Devel::Cover database + +=back + +This just give you the coverage of the F<.pm>s. To also get the C level +coverage you need to + +=over 4 + +=item * + +Additionally tell C to use the appropriate C compiler flags for +C + +=item * + + make perl.gcov + +(instead of C) + +=item * + +After running the tests run C to generate all the F<.gcov> files. +(Including down in the subdirectories of F + +=item * + +(From the top level perl directory) run C on all the C<.gcov> files +to get their stats into the cover_db directory. + +=item * + +Then process the Devel::Cover database + +=back + +It would be good to add a single switch to C to specify that you +wanted to perform perl level coverage, and another to specify C level +coverage, and have C and the F do all the right things +automatically. + =head2 Make Config.pm cope with differences between build and installed perl Quite often vendors ship a perl binary compiled with their (pay-for)