summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-03-07 21:03:20 +0000
committerNicholas Clark <nick@ccl4.org>2011-03-07 21:03:20 +0000
commitdd249ef42f37ee26bdcfb8111778f0607302e877 (patch)
treee001fe14e56bee0cfe56d0d8a5ed8dc9b99286b1 /t
parent028bf728e74682b00bb4314e33ce78574dee577a (diff)
downloadperl-dd249ef42f37ee26bdcfb8111778f0607302e877.tar.gz
Refactor t/thread_it.pl to use test.pl's skip_all_*() functions.
Diffstat (limited to 't')
-rw-r--r--t/thread_it.pl17
1 files changed, 8 insertions, 9 deletions
diff --git a/t/thread_it.pl b/t/thread_it.pl
index feec254664..cbe979f360 100644
--- a/t/thread_it.pl
+++ b/t/thread_it.pl
@@ -2,15 +2,14 @@
use strict;
use warnings;
-use Config;
-if (!$Config{useithreads}) {
- print "1..0 # Skip: no ithreads\n";
- exit 0;
-}
-if ($ENV{PERL_CORE_MINITEST}) {
- print "1..0 # Skip: no dynamic loading on miniperl, no threads\n";
- exit 0;
-}
+# As perlfunc.pod says:
+# Note that the file will not be included twice under the same specified name.
+# So ensure that this, textually, is the same name as all the loaded tests use.
+# Otherwise if we require 'test.pl' and they require './test.pl', it is loaded
+# twice.
+require './test.pl';
+skip_all_without_config('useithreads');
+skip_all_if_miniperl("no dynamic loading on miniperl, no threads");
require threads;