On Sat, 29 Sep 2001, Michael G Schwern wrote: > Have you tried the Test::Builder thing yet? I think you should be > able to solve your forking problem like so:
Working on it > use Test::More tests => 10; # or whatever. Except this needs to printed just once in the parent _before_ any tests are run. > $builder = Test::Builder->new; # get the underlying T::B object for > # fine control. > > $builder->use_numbers(0); I was thinking that I could just do $builder->current_test( $some_num_greater_than_1 ) and it should work. > So the output should look something like: > > 1..10 > ok 1 - normal test > ok 2 - another normal test > ok - forked test 1 (PID 3245) > ok - forked test 2 (PID 3245) > ok - forked test 1 (PID 3246) > ok - forked test 2 (PID 3246) > ok - forked test 1 (PID 3247) > ok - forked test 2 (PID 3247) > ok 9 - last two > ok 10 - normal tests I don't want to give up the numbers. The order of testing is predictable so that's not the problem. Right now I'm stuck on several things. 1. I want to grab the Test::More exported stuff in the child after a fork without printing a 1..foo header, either before (by setting an explicit number of tests) or after (no_plan). Here's what I _really_ want (my list of demands are thusly). A. To be able to use Test::More's functions without ever printing a 1..foo test header. B. To be able to arbitrarily set the current test number. Something like this'd be nice: use Test::More qw(functions_only); # or qw(no_header) That's probably all I need to get it going. -dave /*================== www.urth.org We await the New Sun ==================*/