Re: [tapx-dev] Forking tests

2007-07-12 Thread Ovid
- Original Message From: Andy Armstrong <[EMAIL PROTECTED]> > Can you confirm that this works OK with your runtests? Yup. Works fine. It's me not forcing the shared memory value to be a number, so it looks like we had strange behavior due to padded NULLs. Not sure if this should be

Re: [tapx-dev] Forking tests

2007-07-12 Thread Ovid
- Original Message From: Andy Armstrong <[EMAIL PROTECTED]> > Taking out the shared memory calls and setting the test number > explicitly makes it work under runtests for me. Crap. I get the same results. I'm suspecting that the Test::Class problem is unrelated to this one (though I w

Re: [tapx-dev] Forking tests

2007-07-12 Thread Andy Armstrong
Ovid wrote: > I can never get it to work with the Test::Class code, using either prove or > runtests. In the regular .t style program, it succeeds if I use a leading > plan, but fails if I use a trailing plan with runtests: > > use Test::More tests => 3; > > Versus: > > use Test::More 'no

Re: [tapx-dev] Forking tests

2007-07-12 Thread Ovid
- Original Message From: Andy Armstrong <[EMAIL PROTECTED]> > > Parse errors: No plan found in TAP output > > D'oh - sorry - should have read the output from your runtests properly :) > > So we're losing the plan somehow. I can never get it to work with the Test::Class code, using eith

Re: [tapx-dev] Forking tests

2007-07-12 Thread Ovid
- Original Message From: Andy Armstrong <[EMAIL PROTECTED]> > Interestingly runtests is happy for me: > > [13:38] andy $ runtests -v forkingtest.pl > forkingtest...ok 1 - mytest called > ok 2 - in the child > ok 3 - in the parent > 1..3 > All 3 subtests passed > > Test Summary Repor

Re: [tapx-dev] Forking tests

2007-07-12 Thread Andy Armstrong
Andy Armstrong wrote: > Test Summary Report > --- > forkingtest.pl (Wstat: 0 Tests: 3 Failed: 0) > Parse errors: No plan found in TAP output > Files=1, Tests=3, 0 wallclock secs ( 0.03 cusr + 0.02 csys = 0.05 CPU) D'oh - sorry - should have read the output from your runtests p

Re: [tapx-dev] Forking tests

2007-07-12 Thread Andy Armstrong
Ovid wrote: > - Original Message > From: Andy Armstrong <[EMAIL PROTECTED]> > >> What happens if you explicitly set the test number to what it should be? > >>$test->current_test( 3 ); # < hard wired > > Exact same behavior, which implies (to me) that my use of s

Re: [tapx-dev] Forking tests

2007-07-12 Thread Andy Armstrong
Ovid wrote: > Basically, if I fork a child, when we return, Test::Builder will not have the > new test count, so I explicitly use shared memory [1]. While the above runs > just fine with prove, runtests (from the TAP::Parser distribution), fails > with the following: > > ok 1 - mytest called

Re: [tapx-dev] Forking tests

2007-07-12 Thread Ovid
- Original Message From: Andy Armstrong <[EMAIL PROTECTED]> > What happens if you explicitly set the test number to what it should be? >$test->current_test( 3 ); # < hard wired Exact same behavior, which implies (to me) that my use of shared memory is correct.

Re: [tapx-dev] Forking tests

2007-07-12 Thread Andy Armstrong
Ovid wrote: > Am I doing something really stupid here? Could I be using shared memory incorrectly? What happens if you explicitly set the test number to what it should be? if ( !defined( my $child_pid = fork() ) ) { diag "Cannot fork: $!"; } elsif ( !$child_pid ) { ok