Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Dev

Re: Apache-Test and Devel::Cover

 

 

ModPerl dev RSS feed   Index | Next | Previous | View Threaded


gozer at ectoplasm

Nov 2, 2005, 12:33 AM

Post #1 of 5 (930 views)
Permalink
Re: Apache-Test and Devel::Cover

Geoffrey Young wrote:
> hi all :)
>
> I just commited a patch to Apache-Test in svn that removes all the
> additional work involved with getting Devel::Cover to work for server side
> tests. now a simple 'make testcover' should be all you need to do to get
> coverage results from code within handler() subroutines - no more adding
> modperl_extra.pl entries or other associated foo.

Cool, but when running within the mod_perl-2.0 build environment, you end up
with a testcover target in ModPerl-Registry/Makefile and Apache-Test/Makefile,
but not in the top-level directory.

Any idea why ?

--
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
Attachments: signature.asc (0.25 KB)


geoff at modperlcookbook

Nov 2, 2005, 4:15 AM

Post #2 of 5 (863 views)
Permalink
Re: Apache-Test and Devel::Cover [In reply to]

Philippe M. Chiasson wrote:
> Geoffrey Young wrote:
>
>>hi all :)
>>
>>I just commited a patch to Apache-Test in svn that removes all the
>>additional work involved with getting Devel::Cover to work for server side
>>tests. now a simple 'make testcover' should be all you need to do to get
>>coverage results from code within handler() subroutines - no more adding
>>modperl_extra.pl entries or other associated foo.
>
>
> Cool, but when running within the mod_perl-2.0 build environment, you end up
> with a testcover target in ModPerl-Registry/Makefile and Apache-Test/Makefile,
> but not in the top-level directory.
>
> Any idea why ?

hmm, I'll look into it. that's a subclass there, right?

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


geoff at modperlcookbook

Nov 3, 2005, 8:03 AM

Post #3 of 5 (865 views)
Permalink
Re: Apache-Test and Devel::Cover [In reply to]

Philippe M. Chiasson wrote:
> Geoffrey Young wrote:
>
>>hi all :)
>>
>>I just commited a patch to Apache-Test in svn that removes all the
>>additional work involved with getting Devel::Cover to work for server side
>>tests. now a simple 'make testcover' should be all you need to do to get
>>coverage results from code within handler() subroutines - no more adding
>>modperl_extra.pl entries or other associated foo.
>
>
> Cool, but when running within the mod_perl-2.0 build environment, you end up
> with a testcover target in ModPerl-Registry/Makefile and Apache-Test/Makefile,
> but not in the top-level directory.
>
> Any idea why ?

basically, this is because mod_perl sets up its own test target via MY::test
in it's top-level Makefile.PL. ModPerl-Registry/Makefile.PL inherits its
test target from Apache::Test, a la

use Apache::TestMM qw(test clean);

so, if we want to add coverage foo to mod_perl's test suite we need to do it
manually. I'm not sure it's worth the effort, though - I can't even run a
simple 5 line handler consistently under D::C, let alone the whole mp2 test
suite.

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


paul at pjcj

Nov 3, 2005, 9:50 AM

Post #4 of 5 (852 views)
Permalink
Re: Apache-Test and Devel::Cover [In reply to]

On Thu, Nov 03, 2005 at 11:03:23AM -0500, Geoffrey Young wrote:

> I'm not sure it's worth the effort, though - I can't even run a
> simple 5 line handler consistently under D::C, let alone the whole mp2 test
> suite.

Is this because of threading, which (still) doesn't work in Devel::Cover
or is it some other kind of fundamental brokenness?

Here is where I have to admit that I am still developing with mp1, but
mp2 and Devel::Cover seemed to get on the last time I tried, which was
about 18 months ago using 1.99_13 and the bleadperl du jour. See
http://pjcj.sytes.net/cover/mod_perl-1.99_13/cover_db-5.9.2/coverage.html

--
Paul Johnson - paul [at] pjcj
http://www.pjcj.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


geoff at modperlcookbook

Nov 3, 2005, 10:12 AM

Post #5 of 5 (860 views)
Permalink
Re: Apache-Test and Devel::Cover [In reply to]

Paul Johnson wrote:
> On Thu, Nov 03, 2005 at 11:03:23AM -0500, Geoffrey Young wrote:
>
>
>> I'm not sure it's worth the effort, though - I can't even run a
>>simple 5 line handler consistently under D::C, let alone the whole mp2 test
>>suite.
>
>
> Is this because of threading, which (still) doesn't work in Devel::Cover
> or is it some other kind of fundamental brokenness?

my own level of understanding here really leaves me not knowing what to make
of it at all. the core dumps I've been getting haven't contained anything
useful, and I recently started getting them with mp1 as well.

in truth, my dev box is on its last legs, so I have been somewhat hoping
that that contributed to the problem as well. the reality is that I
sometimes get core dumps and sometimes don't, it sometimes works and
sometimes doesn't, just when I type 'make testcover' a few times without
doing anything else...

if it helps, whether you're using mp1 or mp2 this tarball is what I use as
my test case

http://people.apache.org/~geoff/Apache-Test-with-Devel-Cover.tar.gz

so just

$ perl Makefile.PL -httpd /path/to/whatever/httpd/you/want/1.3/or/2.x

will let you test multiple versions of httpd.

note that it's been updated to work with the latest Apache-Test (that is,
the changes that started this thread) so you'll need a recent version or
need to go fiddling with the extra files yourself.

>
> Here is where I have to admit that I am still developing with mp1,

that's ok, mp1 is still important :)

> but
> mp2 and Devel::Cover seemed to get on the last time I tried, which was
> about 18 months ago using 1.99_13 and the bleadperl du jour. See
> http://pjcj.sytes.net/cover/mod_perl-1.99_13/cover_db-5.9.2/coverage.html
>

wow, that's great. if you could ever give me a hint on how to set the
compile flags to get XS coverage that would be awesom - I'd love to
intelligently add those automatically when compiling mp2 in maintainer mode
so that they show up when using A-T to test XS-based CPAN modules.

--Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl

ModPerl dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.