Apologies for the cross-post.  We should probably discuss it on perl-qa, 
but I wanted to keep module-build informed.

So, it turns out that the implementation that we came up with can't be 
so handy.  Originally, I had done this to just run files with different 
extensions.  During the hackfest, we came up with the bright idea that 
a test_type could be essentially virtual, and so we thought dispatching 
to the action would be best.

The trouble is that dispatching to the action means the test harness 
does one summary per action.  That's not acceptable, so I just backed 
this off to go strictly by testfiles again.

Question:  Is it possible to *cleanly* do multi-run tests (multiple 
execute()s, one summary()) with Test::Harness and still remain as 
backwards compatible as Module::Build wants to be?

Other question:  How difficult is it to do with TAPx::Harness?

Essentially, we're talking about 2 or more actions doing runtests(), but 
I think M.B.ACTION_testall() can easily tell M.B.do_tests() to just 
execute() (or aggregate() in the TAPx.H case.)

ATM, I'm just wondering how thick this is going to get.  If it's not 
easy (meaning someone else will do it), I'm going to play the plugin 
card, make that depend on TAPx, and leave it at that.

Note, the virtual tests are not exactly marginal given that 'testpod' 
and 'testpodcoverage' are builtins (though they do both currently 
suffer from the issue that they are not able to be integrated into the 
summary as virtual test actions.)

# from ericwilhelm
# on Sunday 18 February 2007 05:52 pm:

>-  for my $action ('', grep { $_ ne 'all' } $self->get_test_types) {
>-    $self->_call_action( "test$action" );
>+  my @types;
>+  for my $action (grep { $_ ne 'all' } $self->get_test_types) {
>+    # XXX We can't just dispatch because we get multiple summaries
> but +    # we'll need to dispatch to support custom setup/teardown in
> the +    # action.  To support that, we'll need to call something
> besides +    # Harness::runtests() because we'll need to collect the
> results in +    # parts, then run the summary.
>+    push(@types, $action);
>+    #$self->_call_action( "test$action" );
>   }
>+  $self->generic_test(types => ['default', @types]);
> }

--Eric
-- 
Any sufficiently advanced incompetence is indistinguishable from malice.
--The Napolean-Clarke Law
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------

Reply via email to