Skip to content

Commit e005a34

Browse files
committed
Skip threads testing if threads arent compiled in to perl
1 parent bf8a7f5 commit e005a34

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

t/90-segv-threads.t

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,21 @@
33
use 5.030003;
44
use strict;
55
use warnings;
6-
use threads;
7-
use threads::shared 1.51;
8-
use Time::HiRes qw| usleep |;
6+
7+
BEGIN { eval 'use threads; use threads::shared 1.51;' }
8+
99
use Test::More;
10+
use Config;
11+
use Time::HiRes qw| usleep |;
1012
use Data::Dumper;
1113

14+
# Check if Perl is compiled with thread support
15+
if (!$Config{useithreads}) {
16+
plan skip_all => "this $^O perl $] not configured to support iThreads";
17+
done_testing();
18+
exit 1
19+
}
20+
1221
local $Data::Dumper::Indent = 1;
1322
local $Data::Dumper::Terse = 1;
1423

0 commit comments

Comments
 (0)