Nicholas Clark wrote on 2009-08-28: > On Fri, Aug 28, 2009 at 02:39:45PM +0100, Steve Hay wrote: > >> This doesn't work: >> >> C:\gitclients\perl\t>..\perl .\harness -v >> ..\ext\DynaLoader\t\DynaLoader.t > > That will (or should) tricker some temporary logic to suppress setting > PERL_CORE=1 in %ENV > >> but this does: >> >> C:\gitclients\perl\t>..\perl .\harness -v >> C:\gitclients\perl\ext\DynaLoader\t\DynaLoader.t > > That won't > > The logic is here > http://perl5.git.perl.org/perl.git/blob/HEAD:/t/TEST#l26 and here > http://perl5.git.perl.org/perl.git/blob/HEAD:/t/TEST#l202 > > I wonder if that's it
Ah, so *that*'s where the test actually gets run! I stuck in a print statement to see what the $run command-line actually is. In the relative path case it is: ../../perl -I../../t -MTestInit=U2T,A,NC "-T" t/DynaLoader.t | whereas in the absolute path case it is: ./perl -I. -MTestInit "-T" C:/gitclients/perl/ext/DynaLoader/t/DynaLoader.t | so it looks like the (broken) relative path case has done a cd into ext/DynaLoader, and the (working) absolute path case has not. Is that expected? Running the first of those command-lines from the ext/DynaLoader, it seems that it is actually the "A" flag that causes the breakage, not the "NC" flag: C:\gitclients\perl\ext\DynaLoader>..\..\perl -I../../t -MTestInit=U2T,A,NC "-T" t/DynaLoader.t Not enough arguments for DynaLoader::dl_load_file at t/DynaLoader.t line 90, near "() " BEGIN not safe after errors--compilation aborted at t/DynaLoader.t line 94. C:\gitclients\perl\ext\DynaLoader>..\..\perl -I../../t -MTestInit=U2T,NC "-T" t/DynaLoader.t 1..40 ok 1 - use DynaLoader; ok 2 - DynaLoader->can('bootstrap') [...all tests pass ok...]