On Mon, Mar 15, 2004 at 10:46:07AM -0800, Stas Bekman wrote:

> Philippe M. Chiasson wrote:
> >On Wed, 2004-03-10 at 15:42, Stas Bekman wrote:
> >
> >>rbb is back to the game and he brings gcov (test coverage) for the apr 
> >>test suite:
> >>http://apr.apache.org/coverage/index.html
> >>I wonder if we could/should to do the same for mp2.
> >
> >
> >http://gozer.ectoplasm.org/mod_perl/coverage/report.html
> 
> Thanks, Philippe! Looks like we have a pretty good coverage.

And here is another view on the data, this time with the Perl code
included.

  http://pjcj.sytes.net/cover/mod_perl-1.99_13/cover_db-5.9.2/coverage.html

(That's on my local machine, so it may be a little unreliable.)

This was using apache-2.0.49, mod_perl-1.99_13, and bleadperl from a
couple of days ago.  Oh, and gcc 3.3.3 and Devel::Cover 0.43 plus a
couple of patches to get gcov2perl working again.

I have included all the perl code in the report (normally the code under
t/ would not be reported on) because what strikes me most is the low
coverage of the perl code, and the number of perl modules which don't
ever appear to be use'd and hence don't even appear on the report.

Now it's quite possible that I have not run the tests correctly, but
inserting "die" near the top of a couple of random (apparently untested)
modules didn't appear to cause any test failures.  I count 388 .pm files
in the mod_perl tree, and only 25 of the have any coverage at all.

The commands I used were:

  $ perl5.9.2 Makefile.PL MP_APXS=/usr/local/pkg/apache-2.0.49/bin/apxs 
MODPERL_CC='gcc -fprofile-arcs -ftest-coverage'
  $ HARNESS_PERL_SWITCHES=-I/home/pjcj/g/perl/dev/Devel-Cover/blib/lib\ 
-I/home/pjcj/g/perl/dev/Devel-Cover/blib/arch\ 
-MDevel::Cover=-ignore,Cover,-select,^t/ make test
  $ for f (**/*.c)
  for> (chdir `dirname $f`; gcov `basename $f`)
  $ perl5.9.2 -I/home/pjcj/g/perl/dev/Devel-Cover/blib/lib 
-I/home/pjcj/g/perl/dev/Devel-Cover/blib/arch /home/pjcj/g/perl/dev/Devel-Cover/cover

(The -I's there are just to pick up my development copy of
Devel::Cover.)

Have I made some mistake here, is Devel::Cover wrong, or is the coverage
really that bad?

> For those entries which are reported to be not very well covered, it's not 
> necessarily true, since 'make test' will exercise different parts of the 
> code depending on the used Perl. I wonder if it's possible to run the test 
> suite under several builds (5.6.1, 5.6.1-ithread, 5.8.3, 5.8.3-ithread) and 
> then merge the results.

This is certainly possible using the Devel::Cover framework, but if I
understand correctly, a lot of the files are generated and will be
slightly different for each perl version.  In this case current
Devel::Cover behaviour is to drop the results for the old version of the
file.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to