From: Nicholas Clark Date: Sat, 6 Mar 2004 16:13:48 +0000 (+0000) Subject: Make threads tests pass make minitest (by skipping) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6765206cfafdb7dbdf4791696e6befaa040a8193;p=p5sagit%2Fp5-mst-13.2.git Make threads tests pass make minitest (by skipping) p4raw-id: //depot/perl@22446 --- diff --git a/t/op/getpid.t b/t/op/getpid.t index a2c5f5f..b51b064 100644 --- a/t/op/getpid.t +++ b/t/op/getpid.t @@ -20,11 +20,11 @@ BEGIN { print "1..0 # Skip: no getppid\n"; exit; } - eval 'use threads; use threads::shared'; - if ($@ =~ /dynamic loading not available/) { - print "1..0 # Skip: no dynamic loading, no threads\n"; - exit; + if ($ENV{PERL_CORE_MINITEST}) { + print "1..0 # Skip: no dynamic loading on miniperl, no threads\n"; + exit 0; } + eval 'use threads; use threads::shared'; plan tests => 3; if ($@) { fail("unable to load thread modules"); diff --git a/t/op/threads.t b/t/op/threads.t index 02ae213..8709ece 100644 --- a/t/op/threads.t +++ b/t/op/threads.t @@ -13,13 +13,13 @@ BEGIN { print "1..0 # Skip: no ithreads\n"; exit 0; } - eval 'use threads'; - if ($@ =~ /dynamic loading not available/) { - print "1..0 # Skip: miniperl can't load threads\n"; - exit 0; + if ($ENV{PERL_CORE_MINITEST}) { + print "1..0 # Skip: no dynamic loading on miniperl, no threads\n"; + exit 0; } plan(3); } +use threads; # test that we don't get: # Attempt to free unreferenced scalar: SV 0x40173f3c