David Wheeler wrote:
> On Oct 2, 2004, at 2:30 PM, Geoffrey Young wrote:
> 
>> I started to maintain Apache-Test skeletons, but I never quite got
>> them up
>> to speed.  give me a few days and I'll roll a tarball with a test-cover
>> target so that folks can have an entire working example of the way I
>> would
>> do it.
> 
> 
> Perhaps I should add support for Module::Build's "covertest" action to
> Apache::TestMB...just tell me what it needs to do.

I think that all Apache::TestMB would need to do is add a make target that
looks like this:

test-cover ::
        @cover -delete
        @HARNESS_PERL_SWITCHES=-MDevel::Cover=+inc,$(HOME)/.apache-test
APACHE_TEST_EXTRA_ARGS=-one-process $(MAKE) test
        @cover

broken down it does this

  - HARNESS_PERL_SWITCHES gets Devel::Cover started
  - +inc,$(HOME)/.apache-test keeps coverage away from generated A-T files,
which isn't required
  - -one-process puts httpd in -X mode, but is only suppored in A-T current cvs

there is more to do if you want to generate coverage on mod_perl handlers,
but that needs to happen from httpd.conf land.  however, this will get
Devel::Cover started for *.t files that test normal Perl modules.

HTH

--Geoff

Reply via email to