Change 19117 by [EMAIL PROTECTED] on 2003/04/01 16:07:59
Subject: Re: [EMAIL PROTECTED] bug: make minitest fails with threads
From: Rafael Garcia-Suarez <[EMAIL PROTECTED]>
Date: Tue, 1 Apr 2003 11:02:35 +0200
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/t/op/getpid.t#3 edit
Differences ...
==== //depot/perl/t/op/getpid.t#3 (text) ====
Index: perl/t/op/getpid.t
--- perl/t/op/getpid.t#2~17841~ Wed Sep 4 06:57:27 2002
+++ perl/t/op/getpid.t Tue Apr 1 08:07:59 2003
@@ -11,8 +11,6 @@
use strict;
use Config;
-plan tests => 2;
-
BEGIN {
if (!$Config{useithreads}) {
print "1..0 # Skip: no ithreads\n";
@@ -22,10 +20,19 @@
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;
+ }
+ plan tests => 3;
+ if ($@) {
+ fail("unable to load thread modules");
+ }
+ else {
+ pass("thread modules loaded");
+ }
}
-
-use threads;
-use threads::shared;
my ($pid, $ppid) = ($$, getppid());
my $pid2 : shared = 0;
End of Patch.