perl.qa.metrics http://www.nntp.perl.org/group/perl.qa.metrics/ ... Copyright 1998-2014 perl.org Fri, 29 Aug 2014 22:23:35 +0000 ask@perl.org Re: Devel::Cover in MakeMaker by Stephen Vance That should do the trick. Thanks, Andy!!<br/><br/>Steve<br/><br/>Andy Armstrong wrote:<br/>&gt; On 14 Jun 2007, at 22:45, Stephen Vance wrote:<br/>&gt;&gt; I&#39;m setting up an agile development environment for a client while <br/>&gt;&gt; writing modules most likely targeted for CPAN. I&#39;d like to generate <br/>&gt;&gt; coverage on every invocation of &#39;make test&#39;. What&#39;s the current state <br/>&gt;&gt; of making this happen?<br/>&gt;<br/>&gt; Does it have to be make test?<br/>&gt;<br/>&gt; If you add this to Makefile.PL:<br/>&gt;<br/>&gt; eval &#39;use ExtUtils::MakeMaker::Coverage&#39;;<br/>&gt; warn &quot;Optional ExtUtils::MakeMaker::Coverage not available\n&quot; if $@;<br/>&gt;<br/>&gt; you get make testcover.<br/>&gt;<br/> http://www.nntp.perl.org/group/perl.qa.metrics/2007/06/msg19.html Fri, 15 Jun 2007 11:19:30 +0000 Re: Devel::Cover in MakeMaker by Andy Armstrong On 14 Jun 2007, at 22:45, Stephen Vance wrote:<br/>&gt; I&#39;m setting up an agile development environment for a client while <br/>&gt; writing modules most likely targeted for CPAN. I&#39;d like to generate <br/>&gt; coverage on every invocation of &#39;make test&#39;. What&#39;s the current <br/>&gt; state of making this happen?<br/><br/>Does it have to be make test?<br/><br/>If you add this to Makefile.PL:<br/><br/>eval &#39;use ExtUtils::MakeMaker::Coverage&#39;;<br/>warn &quot;Optional ExtUtils::MakeMaker::Coverage not available\n&quot; if $@;<br/><br/>you get make testcover.<br/><br/>-- <br/>Andy Armstrong, hexten.net<br/><br/> http://www.nntp.perl.org/group/perl.qa.metrics/2007/06/msg18.html Fri, 15 Jun 2007 06:27:44 +0000 Re: Devel::Cover in MakeMaker by James E Keenan Stephen Vance wrote:<br/>&gt; I&#39;m setting up an agile development environment for a client while <br/>&gt; writing modules most likely targeted for CPAN. I&#39;d like to generate <br/>&gt; coverage on every invocation of &#39;make test&#39;. What&#39;s the current state of <br/>&gt; making this happen?<br/>&gt; <br/>Do you need anything more than a shell function like this?<br/><br/>harness ()<br/>{<br/> HARNESS_PERL_SWITCHES=-MDevel::Cover make test<br/>}<br/><br/><br/>jimk<br/> http://www.nntp.perl.org/group/perl.qa.metrics/2007/06/msg17.html Fri, 15 Jun 2007 06:27:40 +0000 Re: Devel::Cover in MakeMaker by Stephen Vance Yes. I&#39;d like it to just run automatically when I do &#39;make test&#39; and be <br/>fully integrated into the generated Makefile. I also want it to do the <br/>&#39;cover -delete&#39; before and &#39;cover&#39; after as part of the test target or <br/>at least as a testcover target. I&#39;m doing the shell wrapper in the meantime.<br/><br/>Steve<br/><br/>James E Keenan wrote:<br/>&gt; Stephen Vance wrote:<br/>&gt;&gt; I&#39;m setting up an agile development environment for a client while <br/>&gt;&gt; writing modules most likely targeted for CPAN. I&#39;d like to generate <br/>&gt;&gt; coverage on every invocation of &#39;make test&#39;. What&#39;s the current state <br/>&gt;&gt; of making this happen?<br/>&gt;&gt;<br/>&gt; Do you need anything more than a shell function like this?<br/>&gt;<br/>&gt; harness ()<br/>&gt; {<br/>&gt; HARNESS_PERL_SWITCHES=-MDevel::Cover make test<br/>&gt; }<br/>&gt;<br/>&gt;<br/>&gt; jimk<br/>&gt;<br/> http://www.nntp.perl.org/group/perl.qa.metrics/2007/06/msg16.html Fri, 15 Jun 2007 05:57:25 +0000 Devel::Cover in MakeMaker by Stephen Vance I&#39;m setting up an agile development environment for a client while <br/>writing modules most likely targeted for CPAN. I&#39;d like to generate <br/>coverage on every invocation of &#39;make test&#39;. What&#39;s the current state of <br/>making this happen?<br/><br/>It&#39;s on the Test::Harness TODO list, but Andy said it&#39;s not near the top <br/>of his list now, and that wouldn&#39;t cover the complete integration. Any <br/>pointers or suggestions on it? Should I just switch to Module::Build and <br/>use the testcover target?<br/><br/>Steve<br/> http://www.nntp.perl.org/group/perl.qa.metrics/2007/06/msg15.html Thu, 14 Jun 2007 14:45:23 +0000 Re: Test Report by Adrian Howard <br/>On 9 Sep 2005, at 18:58, Manish Marathe wrote:<br/>[snip]<br/>&gt; IS there is module which will generate HTML test report after we run<br/>&gt; make test or perhaps after we run that module with make test<br/>[snip]<br/><br/>Would Test::TAP::HTMLMatrix meet your needs (via your local CPAN <br/>mirror) ?<br/><br/>Adrian<br/><br/> http://www.nntp.perl.org/group/perl.qa.metrics/2005/09/msg14.html Sat, 10 Sep 2005 10:21:46 +0000 Test Report by Manish Marathe Hello,<br/><br/>IS there is module which will generate HTML test report after we run<br/>make test or perhaps after we run that module with make test<br/><br/>thanks<br/>-Manish<br/><br/> http://www.nntp.perl.org/group/perl.qa.metrics/2005/09/msg13.html Fri, 09 Sep 2005 10:58:53 +0000 Re: Problem with coverage by Rajanikanth Dandamudi Paul,<br/><br/>perl -V on my machine gives :<br/><br/>Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:<br/> Platform:<br/> osname=solaris, osvers=2.7, archname=sun4-solaris<br/> uname=&#39;sunos apdsparc136 5.7 generic_106541-17 sun4u sparc &#39;<br/> config_args=&#39;&#39;<br/> hint=recommended, useposix=true, d_sigaction=define<br/> usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef<br/> useperlio=define d_sfio=undef uselargefiles=define usesocks=undef<br/> use64bitint=define use64bitall=define uselongdouble=undef<br/> usemymalloc=n, bincompat5005=undef<br/> Compiler:<br/> cc=&#39;/apps/CC50/SUNWspro/SC5.0/bin/cc&#39;, ccflags =&#39;-xtarget=ultra -xarch=v9<br/>-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -xarch=v9 -D_LARGEFILE_SOURCE<br/>-D_FILE_OFFSET_BITS=64&#39;,<br/> optimize=&#39;-O&#39;,<br/> cppflags=&#39;-xtarget=ultra -xarch=v9 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE&#39;<br/><br/> ccversion=&#39;WorkShop Compilers 5.0 98/12/15 C 5.0&#39;, gccversion=&#39;&#39;,<br/>gccosandvers=&#39;&#39;<br/> intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321<br/> d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16<br/> ivtype=&#39;long&#39;, ivsize=8, nvtype=&#39;double&#39;, nvsize=8, Off_t=&#39;off_t&#39;, lseeksize=8<br/> alignbytes=8, prototype=define<br/> Linker and Libraries:<br/> ld=&#39;/apps/CC50/SUNWspro/SC5.0/bin/cc&#39;, ldflags =&#39;-xtarget=ultra -xarch=v9<br/>-xarch=v9 &#39;<br/> libpth=/usr/lib/sparcv9<br/> libs=-lsocket -lnsl -ldl -lm -lc<br/> perllibs=-lsocket -lnsl -ldl -lm -lc<br/> libc=/usr/lib/sparcv9/libc.so, so=so, useshrplib=false, libperl=libperl.a<br/> gnulibc_version=&#39;&#39;<br/> Dynamic Linking:<br/> dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=&#39; &#39;<br/> cccdlflags=&#39;-KPIC&#39;, lddlflags=&#39; -G -xarch=v9&#39;<br/><br/><br/>Characteristics of this binary (from libperl):<br/> Compile-time options: USE_64_BIT_INT USE_64_BIT_ALL USE_LARGE_FILES<br/> Built under solaris<br/> Compiled at Nov 29 2002 10:54:30<br/> %ENV:<br/> PERL5DB=&quot;BEGIN { require<br/>&#39;/vobs/pyramid/perl/distribution/sun7/perl5.005_03/lib/5.00503/perl5db.pl&#39;}&quot;<br/> PERL5LIB=&quot;/usr/local/lib/perl5&quot;<br/> @INC:<br/> /usr/local/lib/perl5<br/> /proj/dite/WorkArea/Raja/perl/install/lib/5.8.0/sun4-solaris<br/> /proj/dite/WorkArea/Raja/perl/install/lib/5.8.0<br/> /proj/dite/WorkArea/Raja/perl/install/lib/site_perl/5.8.0/sun4-solaris<br/> /proj/dite/WorkArea/Raja/perl/install/lib/site_perl/5.8.0<br/> /proj/dite/WorkArea/Raja/perl/install/lib/site_perl<br/><br/>and<br/><br/>program_1/cover.4 is :<br/><br/>$db = {&#39;collected&#39; =&gt; [&#39;statement&#39;,&#39;time&#39;],&#39;cover&#39; =&gt; {&#39;program_1.pl&#39; =&gt;<br/>{&#39;statement&#39; =&gt; {3 =&gt; [[[0]]]}}},&#39;indent&#39; =&gt; 0};<br/><br/>Thanks and Regards,<br/>Rajanikanth<br/><br/><br/>Paul Johnson wrote:<br/><br/>&gt; [ Please note followups set to perl-qa, perl-qa-metrics is pretty much dead ]<br/>&gt;<br/>&gt; On Tue, Dec 03, 2002 at 07:45:04PM +0530, Rajanikanth Dandamudi wrote:<br/>&gt;<br/>&gt; &gt; Paul,<br/>&gt; &gt;<br/>&gt; &gt; I had downloaded the Devel::Cover module form the URL<br/>&gt; &gt; http://search.cpan.org/author/PJCJ/Devel-Cover-0.20/ and trying to get<br/>&gt; &gt; the coverage for a program. I had installed the Devel::Cover module<br/>&gt; &gt; and here is what I had done:<br/>&gt; &gt;<br/>&gt; &gt; * I am using the perl version 5.8.0 .<br/>&gt; &gt;<br/>&gt; &gt; The command I had given is :<br/>&gt; &gt;<br/>&gt; &gt; perl -MDevel::Cover=-db,program_1,-coverage,statement,time program_1.pl<br/>&gt; &gt;<br/>&gt; &gt; The file program_1.pl contains:<br/>&gt; &gt; =================================<br/>&gt; &gt; #!/usr/local/bin/perl<br/>&gt; &gt;<br/>&gt; &gt; print &quot;Hello World\n&quot;;<br/>&gt; &gt;<br/>&gt; &gt; =================================<br/>&gt; &gt;<br/>&gt; &gt; The above command creates a directory and by name program_1 and<br/>&gt; &gt; creates a file by name cover.4 in it.<br/>&gt; &gt;<br/>&gt; &gt; Now when I run the command :<br/>&gt; &gt;<br/>&gt; &gt; cover program_1 -report text<br/>&gt; &gt;<br/>&gt; &gt; I get the following output :<br/>&gt; &gt;<br/>&gt; &gt; Reading database from program_1<br/>&gt; &gt;<br/>&gt; &gt;<br/>&gt; &gt; -------------------------------------------------------- ------ ------ ------<br/>&gt; &gt; File stmt time total<br/>&gt; &gt; -------------------------------------------------------- ------ ------ ------<br/>&gt; &gt; program_1.pl 0.00 n/a 0.00<br/>&gt; &gt; Total 0.00 n/a 0.00<br/>&gt; &gt; -------------------------------------------------------- ------ ------ ------<br/>&gt; &gt;<br/>&gt; &gt;<br/>&gt; &gt; program_1.pl<br/>&gt; &gt;<br/>&gt; &gt; line err stmt time code<br/>&gt; &gt; 1 #!/usr/local/bin/perl<br/>&gt; &gt; 2<br/>&gt; &gt; 3 *** 0 print &quot;Hello World\n&quot;;<br/>&gt; &gt; 4<br/>&gt; &gt;<br/>&gt; &gt; Paul, I am not able to understand why is it showing the coverage as 0.<br/>&gt;<br/>&gt; Neither am I. I went through exactly the same procedure, except with<br/>&gt; bleadperl, and everything worked as expected. Did all of the tests<br/>&gt; pass? Is this a 64bit perl? Has anyone ever run Devel::Cover with a 64<br/>&gt; bit perl? Maybe it&#39;s time for me to plug in my Tru64 box.<br/>&gt;<br/>&gt; Could you send your perl -V and program_1/cover.4?<br/>&gt;<br/>&gt; &gt; Thanks and Regards,<br/>&gt; &gt; Rajanikanth<br/>&gt; &gt;<br/>&gt; &gt;<br/>&gt; &gt; Paul Johnson wrote:<br/>&gt; &gt;<br/>&gt; &gt; &gt; Rajanikanth Dandamudi said:<br/>&gt; &gt; &gt; &gt; Hai<br/>&gt; &gt; &gt; &gt;<br/>&gt; &gt; &gt; &gt; I am planning to get the coverage of a file by name program_1.pl . This<br/>&gt; &gt; &gt; &gt; program_1.pl dynamically loads a c module defined in program_1.so . This<br/>&gt; &gt; &gt; &gt; program_1.so is a 64 bit ELF shared library and the perl available in<br/>&gt; &gt; &gt; &gt; the standard location is a 32-bit perl.<br/>&gt; &gt; &gt; &gt;<br/>&gt; &gt; &gt; &gt; So I had downloaded the perl v5.8.0 from cpan and compiled to obtain<br/>&gt; &gt; &gt; &gt; 64-bit perl. The module Devel/Coverage.pm which I generally use for<br/>&gt; &gt; &gt; &gt; obtaining coverage is not part of the perl distribution. Hence I<br/>&gt; &gt; &gt; &gt; downloaded the package(Devel-Coverage-0.2.tar.gz) and installed the<br/>&gt; &gt; &gt; &gt; Devel/Coverage.pm module.<br/>&gt; &gt; &gt; &gt;<br/>&gt; &gt; &gt; &gt; Now when I run the following command to obtain the coverage :<br/>&gt; &gt; &gt; &gt;<br/>&gt; &gt; &gt; &gt; perl -d:Coverage program_1.pl<br/>&gt; &gt; &gt; &gt;<br/>&gt; &gt; &gt; &gt; I get the following error message:<br/>&gt; &gt; &gt; &gt;<br/>&gt; &gt; &gt; &gt; No DB::DB routine defined at<br/>&gt; &gt; &gt; &gt; /proj/dite/WorkArea/Raja/perl/install/lib/site_perl/5.8.0/Devel/Coverage.pm<br/>&gt; &gt; &gt; &gt; line 4.<br/>&gt; &gt; &gt; &gt; BEGIN failed--compilation aborted at<br/>&gt; &gt; &gt; &gt; /proj/dite/WorkArea/Raja/perl/install/lib/site_perl/5.8.0/Devel/Coverage.pm<br/>&gt; &gt; &gt; &gt; line 4.<br/>&gt; &gt; &gt; &gt; Compilation failed in require.<br/>&gt; &gt; &gt; &gt; BEGIN failed--compilation aborted.<br/>&gt; &gt; &gt; &gt;<br/>&gt; &gt; &gt; &gt;<br/>&gt; &gt; &gt; &gt; Can someone helpme in understanding what the above problem is and how to<br/>&gt; &gt; &gt; &gt; overcome this?<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; This is a known problem. Randy, the author, has said that he will provide<br/>&gt; &gt; &gt; an updated version when he can. I think the solution involves declaring<br/>&gt; &gt; &gt; the DB::DB subroutine earlier, but I am not sure. Your other options are<br/>&gt; &gt; &gt; to go back to 5.6.1, or to try Devel::Cover.<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; Devel::Cover should work on a 64 bit perl, but feel free to send me<br/>&gt; &gt; &gt; feedback if you try it.<br/>&gt;<br/>&gt; Randy, do you have any thoughts about this?<br/>&gt;<br/>&gt; --<br/>&gt; Paul Johnson - paul@pjcj.net<br/>&gt; http://www.pjcj.net<br/><br/> http://www.nntp.perl.org/group/perl.qa.metrics/2002/12/msg12.html Tue, 03 Dec 2002 19:31:00 +0000 Re: Problem with coverage by Paul Johnson [ Please note followups set to perl-qa, perl-qa-metrics is pretty much dead ]<br/><br/>On Tue, Dec 03, 2002 at 07:45:04PM +0530, Rajanikanth Dandamudi wrote:<br/><br/>&gt; Paul,<br/>&gt; <br/>&gt; I had downloaded the Devel::Cover module form the URL<br/>&gt; http://search.cpan.org/author/PJCJ/Devel-Cover-0.20/ and trying to get<br/>&gt; the coverage for a program. I had installed the Devel::Cover module<br/>&gt; and here is what I had done:<br/>&gt; <br/>&gt; * I am using the perl version 5.8.0 .<br/>&gt; <br/>&gt; The command I had given is :<br/>&gt; <br/>&gt; perl -MDevel::Cover=-db,program_1,-coverage,statement,time program_1.pl<br/>&gt; <br/>&gt; The file program_1.pl contains:<br/>&gt; =================================<br/>&gt; #!/usr/local/bin/perl<br/>&gt; <br/>&gt; print &quot;Hello World\n&quot;;<br/>&gt; <br/>&gt; =================================<br/>&gt; <br/>&gt; The above command creates a directory and by name program_1 and<br/>&gt; creates a file by name cover.4 in it.<br/>&gt; <br/>&gt; Now when I run the command :<br/>&gt; <br/>&gt; cover program_1 -report text<br/>&gt; <br/>&gt; I get the following output :<br/>&gt; <br/>&gt; Reading database from program_1<br/>&gt; <br/>&gt; <br/>&gt; -------------------------------------------------------- ------ ------ ------<br/>&gt; File stmt time total<br/>&gt; -------------------------------------------------------- ------ ------ ------<br/>&gt; program_1.pl 0.00 n/a 0.00<br/>&gt; Total 0.00 n/a 0.00<br/>&gt; -------------------------------------------------------- ------ ------ ------<br/>&gt; <br/>&gt; <br/>&gt; program_1.pl<br/>&gt; <br/>&gt; line err stmt time code<br/>&gt; 1 #!/usr/local/bin/perl<br/>&gt; 2<br/>&gt; 3 *** 0 print &quot;Hello World\n&quot;;<br/>&gt; 4<br/>&gt; <br/>&gt; Paul, I am not able to understand why is it showing the coverage as 0.<br/><br/>Neither am I. I went through exactly the same procedure, except with<br/>bleadperl, and everything worked as expected. Did all of the tests<br/>pass? Is this a 64bit perl? Has anyone ever run Devel::Cover with a 64<br/>bit perl? Maybe it&#39;s time for me to plug in my Tru64 box.<br/><br/>Could you send your perl -V and program_1/cover.4?<br/><br/>&gt; Thanks and Regards,<br/>&gt; Rajanikanth<br/>&gt; <br/>&gt; <br/>&gt; Paul Johnson wrote:<br/>&gt; <br/>&gt; &gt; Rajanikanth Dandamudi said:<br/>&gt; &gt; &gt; Hai<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; I am planning to get the coverage of a file by name program_1.pl . This<br/>&gt; &gt; &gt; program_1.pl dynamically loads a c module defined in program_1.so . This<br/>&gt; &gt; &gt; program_1.so is a 64 bit ELF shared library and the perl available in<br/>&gt; &gt; &gt; the standard location is a 32-bit perl.<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; So I had downloaded the perl v5.8.0 from cpan and compiled to obtain<br/>&gt; &gt; &gt; 64-bit perl. The module Devel/Coverage.pm which I generally use for<br/>&gt; &gt; &gt; obtaining coverage is not part of the perl distribution. Hence I<br/>&gt; &gt; &gt; downloaded the package(Devel-Coverage-0.2.tar.gz) and installed the<br/>&gt; &gt; &gt; Devel/Coverage.pm module.<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; Now when I run the following command to obtain the coverage :<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; perl -d:Coverage program_1.pl<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; I get the following error message:<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; No DB::DB routine defined at<br/>&gt; &gt; &gt; /proj/dite/WorkArea/Raja/perl/install/lib/site_perl/5.8.0/Devel/Coverage.pm<br/>&gt; &gt; &gt; line 4.<br/>&gt; &gt; &gt; BEGIN failed--compilation aborted at<br/>&gt; &gt; &gt; /proj/dite/WorkArea/Raja/perl/install/lib/site_perl/5.8.0/Devel/Coverage.pm<br/>&gt; &gt; &gt; line 4.<br/>&gt; &gt; &gt; Compilation failed in require.<br/>&gt; &gt; &gt; BEGIN failed--compilation aborted.<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt;<br/>&gt; &gt; &gt; Can someone helpme in understanding what the above problem is and how to<br/>&gt; &gt; &gt; overcome this?<br/>&gt; &gt;<br/>&gt; &gt; This is a known problem. Randy, the author, has said that he will provide<br/>&gt; &gt; an updated version when he can. I think the solution involves declaring<br/>&gt; &gt; the DB::DB subroutine earlier, but I am not sure. Your other options are<br/>&gt; &gt; to go back to 5.6.1, or to try Devel::Cover.<br/>&gt; &gt;<br/>&gt; &gt; Devel::Cover should work on a 64 bit perl, but feel free to send me<br/>&gt; &gt; feedback if you try it.<br/><br/>Randy, do you have any thoughts about this?<br/><br/>-- <br/>Paul Johnson - paul@pjcj.net<br/>http://www.pjcj.net<br/> http://www.nntp.perl.org/group/perl.qa.metrics/2002/12/msg11.html Tue, 03 Dec 2002 15:25:16 +0000 Re: Problem with coverage by Rajanikanth Dandamudi Paul,<br/><br/>I had downloaded the Devel::Cover module form the<br/>URL http://search.cpan.org/author/PJCJ/Devel-Cover-0.20/ and trying to get the<br/>coverage for a program. I had installed the Devel::Cover module and here is what<br/>I had done:<br/><br/>* I am using the perl version 5.8.0 .<br/><br/>The command I had given is :<br/><br/>perl -MDevel::Cover=-db,program_1,-coverage,statement,time program_1.pl<br/><br/>The file program_1.pl contains:<br/>=================================<br/>#!/usr/local/bin/perl<br/><br/>print &quot;Hello World\n&quot;;<br/><br/>=================================<br/><br/>The above command creates a directory and by name program_1 and creates a file<br/>by name cover.4 in it.<br/><br/>Now when I run the command :<br/><br/>cover program_1 -report text<br/><br/>I get the following output :<br/><br/>Reading database from program_1<br/><br/><br/>-------------------------------------------------------- ------ ------ ------<br/>File stmt time total<br/>-------------------------------------------------------- ------ ------ ------<br/>program_1.pl 0.00 n/a 0.00<br/>Total 0.00 n/a 0.00<br/>-------------------------------------------------------- ------ ------ ------<br/><br/><br/>program_1.pl<br/><br/>line err stmt time code<br/>1 #!/usr/local/bin/perl<br/>2<br/>3 *** 0 print &quot;Hello World\n&quot;;<br/>4<br/><br/>Paul, I am not able to understand why is it showing the coverage as 0.<br/><br/>Thanks and Regards,<br/>Rajanikanth<br/><br/><br/>Paul Johnson wrote:<br/><br/>&gt; Rajanikanth Dandamudi said:<br/>&gt; &gt; Hai<br/>&gt; &gt;<br/>&gt; &gt; I am planning to get the coverage of a file by name program_1.pl . This<br/>&gt; &gt; program_1.pl dynamically loads a c module defined in program_1.so . This<br/>&gt; &gt; program_1.so is a 64 bit ELF shared library and the perl available in<br/>&gt; &gt; the standard location is a 32-bit perl.<br/>&gt; &gt;<br/>&gt; &gt; So I had downloaded the perl v5.8.0 from cpan and compiled to obtain<br/>&gt; &gt; 64-bit perl. The module Devel/Coverage.pm which I generally use for<br/>&gt; &gt; obtaining coverage is not part of the perl distribution. Hence I<br/>&gt; &gt; downloaded the package(Devel-Coverage-0.2.tar.gz) and installed the<br/>&gt; &gt; Devel/Coverage.pm module.<br/>&gt; &gt;<br/>&gt; &gt; Now when I run the following command to obtain the coverage :<br/>&gt; &gt;<br/>&gt; &gt; perl -d:Coverage program_1.pl<br/>&gt; &gt;<br/>&gt; &gt; I get the following error message:<br/>&gt; &gt;<br/>&gt; &gt; No DB::DB routine defined at<br/>&gt; &gt; /proj/dite/WorkArea/Raja/perl/install/lib/site_perl/5.8.0/Devel/Coverage.pm<br/>&gt; &gt; line 4.<br/>&gt; &gt; BEGIN failed--compilation aborted at<br/>&gt; &gt; /proj/dite/WorkArea/Raja/perl/install/lib/site_perl/5.8.0/Devel/Coverage.pm<br/>&gt; &gt; line 4.<br/>&gt; &gt; Compilation failed in require.<br/>&gt; &gt; BEGIN failed--compilation aborted.<br/>&gt; &gt;<br/>&gt; &gt;<br/>&gt; &gt; Can someone helpme in understanding what the above problem is and how to<br/>&gt; &gt; overcome this?<br/>&gt;<br/>&gt; This is a known problem. Randy, the author, has said that he will provide<br/>&gt; an updated version when he can. I think the solution involves declaring<br/>&gt; the DB::DB subroutine earlier, but I am not sure. Your other options are<br/>&gt; to go back to 5.6.1, or to try Devel::Cover.<br/>&gt;<br/>&gt; Devel::Cover should work on a 64 bit perl, but feel free to send me<br/>&gt; feedback if you try it.<br/>&gt;<br/>&gt; --<br/>&gt; Paul Johnson - paul@pjcj.net<br/>&gt; http://www.pjcj.net<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.qa.metrics/2002/12/msg10.html Tue, 03 Dec 2002 06:15:12 +0000 [Fwd: Re: Problem with coverage] by Rajanikanth Dandamudi Hi,<br/><br/>Any comments?<br/><br/>Thanks and Regards,<br/>Rajanikanth<br/><br/><br/>-------- Original Message --------<br/>Subject: Re: Problem with coverage<br/>Date: Mon, 2 Dec 2002 14:39:14 +0100 (CET)<br/>From: &quot;Paul Johnson&quot; &lt;paul@pjcj.net&gt;<br/>To: &lt;raja@india.ti.com&gt;<br/>CC: &lt;beginners@perl.org&gt;<br/>References: &lt;3DEB552F.18C6B0E8@india.ti.com&gt;<br/><br/><br/>Rajanikanth Dandamudi said:<br/>&gt; Hai<br/>&gt;<br/>&gt; I am planning to get the coverage of a file by name program_1.pl . This<br/>&gt; program_1.pl dynamically loads a c module defined in program_1.so . This<br/>&gt; program_1.so is a 64 bit ELF shared library and the perl available in<br/>&gt; the standard location is a 32-bit perl.<br/>&gt;<br/>&gt; So I had downloaded the perl v5.8.0 from cpan and compiled to obtain<br/>&gt; 64-bit perl. The module Devel/Coverage.pm which I generally use for<br/>&gt; obtaining coverage is not part of the perl distribution. Hence I<br/>&gt; downloaded the package(Devel-Coverage-0.2.tar.gz) and installed the<br/>&gt; Devel/Coverage.pm module.<br/>&gt;<br/>&gt; Now when I run the following command to obtain the coverage :<br/>&gt;<br/>&gt; perl -d:Coverage program_1.pl<br/>&gt;<br/>&gt; I get the following error message:<br/>&gt;<br/>&gt; No DB::DB routine defined at<br/>&gt; /proj/dite/WorkArea/Raja/perl/install/lib/site_perl/5.8.0/Devel/Coverage.pm<br/>&gt; line 4.<br/>&gt; BEGIN failed--compilation aborted at<br/>&gt; /proj/dite/WorkArea/Raja/perl/install/lib/site_perl/5.8.0/Devel/Coverage.pm<br/>&gt; line 4.<br/>&gt; Compilation failed in require.<br/>&gt; BEGIN failed--compilation aborted.<br/>&gt;<br/>&gt;<br/>&gt; Can someone helpme in understanding what the above problem is and how to<br/>&gt; overcome this?<br/><br/>This is a known problem. Randy, the author, has said that he will<br/>provide<br/>an updated version when he can. I think the solution involves declaring<br/>the DB::DB subroutine earlier, but I am not sure. Your other options<br/>are<br/>to go back to 5.6.1, or to try Devel::Cover.<br/><br/>Devel::Cover should work on a 64 bit perl, but feel free to send me<br/>feedback if you try it.<br/><br/>-- <br/>Paul Johnson - paul@pjcj.net<br/>http://www.pjcj.net<br/> http://www.nntp.perl.org/group/perl.qa.metrics/2002/12/msg9.html Tue, 03 Dec 2002 03:01:42 +0000 Re: Preliminary test coverage analysis by Michael G Schwern On Thu, Oct 18, 2001 at 12:07:26AM -0600, chromatic wrote:<br/>&gt; &gt; - Of those covered, a smidge less than half have &lt; 75% statement coverage. - &quot;<br/>&gt; &gt; &quot; &quot; , 20% have &lt; 50% statement coverage.<br/>&gt;<br/>&gt; Is it possible to get an update on this? Writing a new test from<br/>&gt; scratch is generally harder than adding to an existing test. (It&#39;s<br/>&gt; probably the blank page thing that plagues authors.)<br/><br/>Unfortunately, no. Devel::Coverage is fundamentally broken and<br/>Devel::Cover is gagging on the core test suite.<br/><br/>I&#39;ll see what I can do about getting Devel::Cover working.<br/><br/><br/>-- <br/><br/>Michael G. Schwern &lt;schwern@pobox.com&gt; http://www.pobox.com/~schwern/<br/>Perl6 Quality Assurance &lt;perl-qa@perl.org&gt; Kwalitee Is Job One<br/>&quot;What&#39;s black and white and makes you duck as it goes by?&quot;<br/>&quot;A nun with a spear through her head.&quot;<br/> http://www.nntp.perl.org/group/perl.qa.metrics/2001/10/msg8.html Thu, 18 Oct 2001 19:43:01 +0000 Re: Preliminary test coverage analysis by chromatic In article &lt;20010217042542.A24874@magnonel.guild.net&gt;, &quot;schwern&quot;<br/>&lt;schwern@pobox.com&gt; wrote:<br/><br/>Going back eight months, this was the state of things. Schwern had just added<br/>coverage analysis to Test::Harness:<br/><br/>&gt; - A bit less than half of all the core libraries have no coverage at all.<br/>&gt; <br/>&gt; Some very important things are not covered: AutoSplit, CPAN, Cwd,<br/>&gt; Data::Dumper, MakeMaker, Pod::Html, Pod::Man and Term::ReadLine.<br/><br/>We&#39;re aware of most of these, and most of them still don&#39;t have tests. (I&#39;m<br/>trying, I&#39;m trying!)<br/> <br/>&gt; - Of those covered, a smidge less than half have &lt; 75% statement coverage. - &quot;<br/>&gt; &quot; &quot; , 20% have &lt; 50% statement coverage.<br/> <br/>Is it possible to get an update on this? Writing a new test from scratch is<br/>generally harder than adding to an existing test. (It&#39;s probably the blank page<br/>thing that plagues authors.)<br/><br/>If we can identify some spots that need ~ 30 minutes/25 lines of attention, I<br/>can bang on the &quot;get involved, you lazy bums&quot; drum and try to find some new<br/>people.<br/><br/>-- c<br/> http://www.nntp.perl.org/group/perl.qa.metrics/2001/10/msg7.html Thu, 18 Oct 2001 19:12:36 +0000 Re: [ANNOUNCE] Devel::Cover 0.01 by Paul Johnson On Tue, Apr 10, 2001 at 04:53:07PM +0100, Michael G Schwern wrote:<br/>&gt; On Mon, Apr 09, 2001 at 11:15:20PM +0200, Paul Johnson wrote:<br/>&gt; &gt; I&#39;ve started writing a code coverage module for Perl.<br/>&gt; <br/>&gt; Yay!<br/>&gt; <br/>&gt; <br/>&gt; &gt; Those requirements are real - not even 5.6.0 will work. I don&#39;t know<br/>&gt; &gt; about the 5.6.1 trials.<br/>&gt; <br/>&gt; I don&#39;t know what&#39;s gone into 5.6.1, but what&#39;s depending on 5.6.1?<br/><br/>It&#39;s the general improvement in B.<br/><br/>It&#39;s possible that I could make it work with older versions, but I&#39;m not<br/>sure it&#39;s worth the effort. 5.6.0 was never really all that good, and I<br/>think it would probably be too much effort for 5.005_03. I might look<br/>into it though since I use 5.005_03 at work.<br/><br/>Version 0.02 is now out by the way, sporting a spiffy new summary mode.<br/><br/>-- <br/>Paul Johnson - paul@pjcj.net<br/>http://www.pjcj.net<br/> http://www.nntp.perl.org/group/perl.qa.metrics/2001/04/msg6.html Tue, 10 Apr 2001 09:03:26 +0000 Re: [ANNOUNCE] Devel::Cover 0.01 by Michael G Schwern On Mon, Apr 09, 2001 at 11:15:20PM +0200, Paul Johnson wrote:<br/>&gt; I&#39;ve started writing a code coverage module for Perl.<br/><br/>Yay!<br/><br/><br/>&gt; Those requirements are real - not even 5.6.0 will work. I don&#39;t know<br/>&gt; about the 5.6.1 trials.<br/><br/>I don&#39;t know what&#39;s gone into 5.6.1, but what&#39;s depending on 5.6.1?<br/><br/><br/>-- <br/><br/>Michael G. Schwern &lt;schwern@pobox.com&gt; http://www.pobox.com/~schwern/<br/>Perl6 Quality Assurance &lt;perl-qa@perl.org&gt; Kwalitee Is Job One<br/>last, paste for all<br/>citizens will proclaim me<br/>paste enema god<br/> -- imploded<br/> http://www.nntp.perl.org/group/perl.qa.metrics/2001/04/msg5.html Tue, 10 Apr 2001 08:53:27 +0000 [ANNOUNCE] Devel::Cover 0.01 by Paul Johnson I&#39;ve started writing a code coverage module for Perl.<br/><br/>Yes, another one.<br/><br/>Why? Well, I felt a different approach was needed to get sufficient<br/>information to report on different coverage criteria. Hooking into the<br/>debugger can provide information for statement coverage, but little<br/>else.<br/><br/>From the README:<br/><br/> Code coverage data are collected using a plugable runops subroutine<br/> which counts how many times each op is executed. These data are then<br/> mapped back to reality using the B compiler modules.<br/><br/> At the moment, only statement coverage information is reported. Coverage<br/> data for other metrics are collected, but not reported. Coverage data<br/> for some metrics are not yet collected.<br/><br/> Requirements: Perl 5.6.1 or bleadperl. The ability to compile XS<br/> extensions.<br/><br/>Those requirements are real - not even 5.6.0 will work. I don&#39;t know<br/>about the 5.6.1 trials.<br/><br/>&quot;Release early, release often&quot;, right? Well this one is early, but it<br/>seems to work reasonably well. I&#39;ve run it on my Gedcom module on CPAN.<br/>I haven&#39;t fully analysed the results, but the output looks realistic.<br/><br/>Get it from my homepage http://www.pjcj.net. I&#39;ll chuck it on CPAN in a<br/>while, pending any comments which are, of course, very welcome.<br/><br/>-- <br/>Paul Johnson - paul@pjcj.net<br/>http://www.pjcj.net<br/> http://www.nntp.perl.org/group/perl.qa.metrics/2001/04/msg4.html Mon, 09 Apr 2001 14:37:50 +0000 Re: Preliminary test coverage analysis by schwern On Mon, Feb 19, 2001 at 04:59:57PM -0500, Fisher Mark wrote:<br/>&gt; &gt;Some very important things are not covered: AutoSplit, CPAN, Cwd,<br/>&gt; &gt;Data::Dumper, MakeMaker, Pod::Html, Pod::Man and Term::ReadLine.<br/>&gt; <br/>&gt; I don&#39;t know about the others, but I had to patch t/lib/dumper.t so that<br/>&gt; patch 8750 (One-at-a-Time key hashing function) could run cleanly. That<br/>&gt; tests Data::Dumper in both pure Perl and XS forms. Unfortunately, I&#39;m not<br/>&gt; sure why t/lib/dumper.t is not being picked up by the coverage code.<br/><br/>Looking at the coverage data for that test, its severely damaged.<br/><br/>Run ./perl -Ilib -d:Coverge t/lib/dumper.t (assuming Devel::Coverage<br/>is somewhere in PERL5LIB) and you get t/dumper.t.cvp with everything<br/>commented out. Even so, there&#39;s no mention of Data::Dumper.<br/><br/>Methinks there&#39;s still a few bugs in the system.<br/><br/><br/>-- <br/>Michael G Schwern &lt;schwern@pobox.com&gt; http://www.pobox.com/~schwern/<br/>Perl6 Quality Assurance &lt;perl-qa@perl.org&gt; Kwalitee Is Job One<br/> http://www.nntp.perl.org/group/perl.qa.metrics/2001/02/msg3.html Mon, 19 Feb 2001 15:44:05 +0000 RE: Preliminary test coverage analysis by Fisher Mark &gt;Some very important things are not covered: AutoSplit, CPAN, Cwd,<br/>&gt;Data::Dumper, MakeMaker, Pod::Html, Pod::Man and Term::ReadLine.<br/><br/>I don&#39;t know about the others, but I had to patch t/lib/dumper.t so that<br/>patch 8750 (One-at-a-Time key hashing function) could run cleanly. That<br/>tests Data::Dumper in both pure Perl and XS forms. Unfortunately, I&#39;m not<br/>sure why t/lib/dumper.t is not being picked up by the coverage code.<br/>===============================================<br/>Mark Leighton Fisher fisherm@tce.com<br/>Thomson multimedia Indianapolis IN<br/>&quot;Display some adaptability.&quot; -- Doug Shaftoe, _Cryptonomicon_<br/><br/> http://www.nntp.perl.org/group/perl.qa.metrics/2001/02/msg2.html Mon, 19 Feb 2001 14:11:38 +0000 Preliminary test coverage analysis by schwern I&#39;ve wedged coverage analysis into Test::Harness (not quite ready for<br/>release yet) and ran it over Perl&#39;s core test suite to see how well<br/>the core modules are covered. I&#39;m not 100% sure about this data,<br/>Devel::Coverage needs alot of work and reported alot of false<br/>negatives, but I think I can make a preliminary analysis:<br/><br/>- A bit less than half of all the core libraries have no coverage at all.<br/><br/>Some very important things are not covered: AutoSplit, CPAN, Cwd,<br/>Data::Dumper, MakeMaker, Pod::Html, Pod::Man and Term::ReadLine. Some<br/>of this can be fixed easily by pulling in tests from their CPAN<br/>versions. (More on this next post).<br/><br/>- Of those covered, a smidge less than half have &lt; 75% statement coverage.<br/>- &quot; &quot; &quot; , 20% have &lt; 50% statement coverage.<br/><br/>That last bit is better than I expected. I would have thought more of<br/>the tests would have been of the anemic type. It seems what&#39;s there is<br/>in okay shape.<br/><br/>I&#39;m not going to release the raw data just yet because Devel::Coverage<br/>made alot of mistakes which I have to fix by hand. I&#39;ll see if I can<br/>doctor up a list of uncovered modules.<br/><br/><br/> http://www.nntp.perl.org/group/perl.qa.metrics/2001/02/msg1.html Sun, 18 Feb 2001 14:16:10 +0000