# from Jonathan Swartz # on Friday 26 October 2007 06:53: >I'd like to avoid actually running a single script per class, for >efficiency reasons - i.e. I agree with Ovid and Adrian here: > http://use.perl.org/~Ovid/journal/31172 > >It seems like it should be possible (easy?) to create a new >TAP::Harness that treated each Test::Class class as its own "script" >in the output.
Building it as a TAP::Harness plugin sort-of implies that the tap stream contains diagnostics which tie the results to a given class. Perhaps a solution which involves a pre-fork model of Test::Class would be a little neater. The "test scripts" would then be sub-sub-processes and the harness just needs filehandles from each of those. # $self is (roughly) a TAP::Harness my $driver = Test::ClassDriver->new(%some_params); foreach my $test ($driver->classes) { my $name = $test->name; my $out = $test->stdout; # initiates the sub-sub-process $self->process_results($name, $out); } This is just a quick scribble to illustrate what I mean, but I think $driver could fairly easily be a process which had pre-loaded all of the classes. If each $test were a fork, it would conceivably parallelize just by partitioning $driver->classes. --Eric -- "Left to themselves, things tend to go from bad to worse." --Murphy's Corollary --------------------------------------------------- http://scratchcomputing.com ---------------------------------------------------