about summary refs log tree commit
path: root/t
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2014-10-09 08:17:54 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2014-10-09 08:17:54 +0100
commit1e024ecaee14c419c5330a488bccfeb9022bede6 (patch)
tree2053dd5572fdab769f0fd56a2e05688ace49b9d3 /t
parentdb88f03536cd3ee8b7a84e5634d8627884e268d6 (diff)
downloadperl-libnet-1e024ecaee14c419c5330a488bccfeb9022bede6.tar.gz
Better skipping of more tests requiring fork()
See also 6cda6a94c3.
Diffstat (limited to 't')
-rw-r--r--t/nntp_ipv6.t6
-rw-r--r--t/pop3_ipv6.t6
-rw-r--r--t/smtp_ipv6.t6
3 files changed, 15 insertions, 3 deletions
diff --git a/t/nntp_ipv6.t b/t/nntp_ipv6.t
index 62167b9..fbb1458 100644
--- a/t/nntp_ipv6.t
+++ b/t/nntp_ipv6.t
@@ -5,6 +5,7 @@ use 5.008001;
 use strict;
 use warnings;
 
+use Config;
 use File::Temp 'tempfile';
 use Net::NNTP;
 use Test::More;
@@ -15,7 +16,10 @@ my $inet6class = Net::NNTP->can_inet6;
 plan skip_all => "no IPv6 support found in Net::NNTP" if ! $inet6class;
 
 plan skip_all => "fork not supported on this platform"
-  if grep { $^O =~m{$_} } qw(MacOS VOS vmesa riscos amigaos);
+  unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
+    (($^O eq 'MSWin32' || $^O eq 'NetWare') and
+     $Config::Config{useithreads} and
+     $Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);
 
 my $srv = $inet6class->new(
   LocalAddr => '::1',
diff --git a/t/pop3_ipv6.t b/t/pop3_ipv6.t
index 9b3c8cb..004a642 100644
--- a/t/pop3_ipv6.t
+++ b/t/pop3_ipv6.t
@@ -5,6 +5,7 @@ use 5.008001;
 use strict;
 use warnings;
 
+use Config;
 use File::Temp 'tempfile';
 use Net::POP3;
 use Test::More;
@@ -15,7 +16,10 @@ my $inet6class = Net::POP3->can_inet6;
 plan skip_all => "no IPv6 support found in Net::POP3" if ! $inet6class;
 
 plan skip_all => "fork not supported on this platform"
-  if grep { $^O =~m{$_} } qw(MacOS VOS vmesa riscos amigaos);
+  unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
+    (($^O eq 'MSWin32' || $^O eq 'NetWare') and
+     $Config::Config{useithreads} and
+     $Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);
 
 my $srv = $inet6class->new(
   LocalAddr => '::1',
diff --git a/t/smtp_ipv6.t b/t/smtp_ipv6.t
index 6e4a990..78a14fe 100644
--- a/t/smtp_ipv6.t
+++ b/t/smtp_ipv6.t
@@ -5,6 +5,7 @@ use 5.008001;
 use strict;
 use warnings;
 
+use Config;
 use File::Temp 'tempfile';
 use Net::SMTP;
 use Test::More;
@@ -15,7 +16,10 @@ my $inet6class = Net::SMTP->can_inet6;
 plan skip_all => "no IPv6 support found in Net::SMTP" if ! $inet6class;
 
 plan skip_all => "fork not supported on this platform"
-  if grep { $^O =~m{$_} } qw(MacOS VOS vmesa riscos amigaos);
+  unless $Config::Config{d_fork} || $Config::Config{d_pseudofork} ||
+    (($^O eq 'MSWin32' || $^O eq 'NetWare') and
+     $Config::Config{useithreads} and
+     $Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/);
 
 my $srv = $inet6class->new(
   LocalAddr => '::1',