summaryrefslogtreecommitdiff
path: root/ext/Thread
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-06-17 22:24:53 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-17 22:24:53 +0000
commit0fcb073ca17b7658c8a82f28d44643e63d8c0a69 (patch)
treeae49058afb8c7a2028ca56f01181e32892da4494 /ext/Thread
parentafdabcd7377b03ffa304a2b4f4891cb4b6445c05 (diff)
downloadperl-0fcb073ca17b7658c8a82f28d44643e63d8c0a69.tar.gz
Protect the (original) thread tests against testing if no 5.005
threads have been configured. p4raw-id: //depot/perl@10673
Diffstat (limited to 'ext/Thread')
-rw-r--r--ext/Thread/create.t12
-rw-r--r--ext/Thread/die.t12
-rw-r--r--ext/Thread/die2.t12
-rw-r--r--ext/Thread/io.t12
-rw-r--r--ext/Thread/join.t12
-rw-r--r--ext/Thread/join2.t12
-rw-r--r--ext/Thread/list.t12
-rw-r--r--ext/Thread/lock.t12
-rw-r--r--ext/Thread/queue.t12
-rw-r--r--ext/Thread/specific.t12
-rw-r--r--ext/Thread/sync.t12
-rw-r--r--ext/Thread/sync2.t12
-rw-r--r--ext/Thread/unsync.t12
-rw-r--r--ext/Thread/unsync2.t12
-rw-r--r--ext/Thread/unsync3.t12
-rw-r--r--ext/Thread/unsync4.t12
16 files changed, 192 insertions, 0 deletions
diff --git a/ext/Thread/create.t b/ext/Thread/create.t
index df8fc77ba3..7cc8334eb4 100644
--- a/ext/Thread/create.t
+++ b/ext/Thread/create.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread 'async';
use Config;
use Tie::Hash;
diff --git a/ext/Thread/die.t b/ext/Thread/die.t
index 623940579f..1a65f1413b 100644
--- a/ext/Thread/die.t
+++ b/ext/Thread/die.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread 'async';
$t = async {
diff --git a/ext/Thread/die2.t b/ext/Thread/die2.t
index f6b695520f..4bc611a321 100644
--- a/ext/Thread/die2.t
+++ b/ext/Thread/die2.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread 'async';
$t = async {
diff --git a/ext/Thread/io.t b/ext/Thread/io.t
index 6012008ef5..693d91067d 100644
--- a/ext/Thread/io.t
+++ b/ext/Thread/io.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread;
sub counter {
diff --git a/ext/Thread/join.t b/ext/Thread/join.t
index cba2c1cf56..d24473f2a0 100644
--- a/ext/Thread/join.t
+++ b/ext/Thread/join.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread;
sub foo {
print "In foo with args: @_\n";
diff --git a/ext/Thread/join2.t b/ext/Thread/join2.t
index 99b43a54dc..04f244d02c 100644
--- a/ext/Thread/join2.t
+++ b/ext/Thread/join2.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread;
sub foo {
print "In foo with args: @_\n";
diff --git a/ext/Thread/list.t b/ext/Thread/list.t
index f13f4b266a..f03fa06c18 100644
--- a/ext/Thread/list.t
+++ b/ext/Thread/list.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread qw(async);
use Thread::Semaphore;
diff --git a/ext/Thread/lock.t b/ext/Thread/lock.t
index fefb129879..b8887878a0 100644
--- a/ext/Thread/lock.t
+++ b/ext/Thread/lock.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread;
$level = 0;
diff --git a/ext/Thread/queue.t b/ext/Thread/queue.t
index 4672ba6ee7..5c1a7e763d 100644
--- a/ext/Thread/queue.t
+++ b/ext/Thread/queue.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread;
use Thread::Queue;
diff --git a/ext/Thread/specific.t b/ext/Thread/specific.t
index da130b1d64..c2bf1a15d0 100644
--- a/ext/Thread/specific.t
+++ b/ext/Thread/specific.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread;
use Thread::Specific qw(foo);
diff --git a/ext/Thread/sync.t b/ext/Thread/sync.t
index 6445b5579c..c5cf1a754f 100644
--- a/ext/Thread/sync.t
+++ b/ext/Thread/sync.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread;
$level = 0;
diff --git a/ext/Thread/sync2.t b/ext/Thread/sync2.t
index ffc74b4ec1..ace0cbdfe7 100644
--- a/ext/Thread/sync2.t
+++ b/ext/Thread/sync2.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread;
$global = undef;
diff --git a/ext/Thread/unsync.t b/ext/Thread/unsync.t
index f0a51efe1f..51faa8c24b 100644
--- a/ext/Thread/unsync.t
+++ b/ext/Thread/unsync.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread;
$| = 1;
diff --git a/ext/Thread/unsync2.t b/ext/Thread/unsync2.t
index fb955ac31e..0016646447 100644
--- a/ext/Thread/unsync2.t
+++ b/ext/Thread/unsync2.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread;
$| = 1;
diff --git a/ext/Thread/unsync3.t b/ext/Thread/unsync3.t
index e03e9c8af1..a1d2c56d39 100644
--- a/ext/Thread/unsync3.t
+++ b/ext/Thread/unsync3.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread;
$| = 1;
diff --git a/ext/Thread/unsync4.t b/ext/Thread/unsync4.t
index 494ad2be92..1186fc030f 100644
--- a/ext/Thread/unsync4.t
+++ b/ext/Thread/unsync4.t
@@ -1,3 +1,15 @@
+BEGIN {
+ eval { require Config; import Config };
+ if ($@) {
+ print "1..0 # Skip: no Config\n";
+ exit(0);
+ }
+ if ($Config{extensions} !~ /\bThread\b/) {
+ print "1..0 # Skip: no use5005threads\n";
+ exit(0);
+ }
+}
+
use Thread;
$| = 1;