From: Jarkko Hietaniemi Date: Thu, 22 Nov 2001 04:45:36 +0000 (+0000) Subject: Corify the Net::Ping tests; skip the tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0cf115ef1b426406ab4344439c6ffcb9ee04d4c4;p=p5sagit%2Fp5-mst-13.2.git Corify the Net::Ping tests; skip the tests unless $ENV{PERL_TEST_Net_Ping} is true. p4raw-id: //depot/perl@13190 --- diff --git a/lib/Net/Ping/t/100_load.t b/lib/Net/Ping/t/100_load.t index d6a71e0..c5115f7 100644 --- a/lib/Net/Ping/t/100_load.t +++ b/lib/Net/Ping/t/100_load.t @@ -1,3 +1,14 @@ +BEGIN { + if ($ENV{PERL_CORE}) { + unless ($ENV{PERL_TEST_Net_Ping}) { + print "1..0 # Skip: network dependent test\n"; + exit; + } + chdir 't' if -d 't'; + @INC = qw(../lib); + } +} + # Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl test.t' diff --git a/lib/Net/Ping/t/110_icmp_inst.t b/lib/Net/Ping/t/110_icmp_inst.t index 2e67a59..215d46c 100644 --- a/lib/Net/Ping/t/110_icmp_inst.t +++ b/lib/Net/Ping/t/110_icmp_inst.t @@ -1,3 +1,14 @@ +BEGIN { + if ($ENV{PERL_CORE}) { + unless ($ENV{PERL_TEST_Net_Ping}) { + print "1..0 # Skip: network dependent test\n"; + exit; + } + chdir 't' if -d 't'; + @INC = qw(../lib); + } +} + # Test to make sure object can be instantiated for icmp protocol. # Root access is required to actually perform icmp testing. diff --git a/lib/Net/Ping/t/120_udp_inst.t b/lib/Net/Ping/t/120_udp_inst.t index ee53bd4..51d1dac 100644 --- a/lib/Net/Ping/t/120_udp_inst.t +++ b/lib/Net/Ping/t/120_udp_inst.t @@ -1,3 +1,14 @@ +BEGIN { + if ($ENV{PERL_CORE}) { + unless ($ENV{PERL_TEST_Net_Ping}) { + print "1..0 # Skip: network dependent test\n"; + exit; + } + chdir 't' if -d 't'; + @INC = qw(../lib); + } +} + # Test to make sure object can be instantiated for udp protocol. # I do not know of any servers that support udp echo anymore. diff --git a/lib/Net/Ping/t/130_tcp_inst.t b/lib/Net/Ping/t/130_tcp_inst.t index 6a547e1..30db8bd 100644 --- a/lib/Net/Ping/t/130_tcp_inst.t +++ b/lib/Net/Ping/t/130_tcp_inst.t @@ -1,3 +1,14 @@ +BEGIN { + if ($ENV{PERL_CORE}) { + unless ($ENV{PERL_TEST_Net_Ping}) { + print "1..0 # Skip: network dependent test\n"; + exit; + } + chdir 't' if -d 't'; + @INC = qw(../lib); + } +} + # Test to make sure object can be instantiated for tcp protocol. use Test; diff --git a/lib/Net/Ping/t/200_ping_tcp.t b/lib/Net/Ping/t/200_ping_tcp.t index 3f5c6bc..2aa4eec 100644 --- a/lib/Net/Ping/t/200_ping_tcp.t +++ b/lib/Net/Ping/t/200_ping_tcp.t @@ -1,3 +1,14 @@ +BEGIN { + if ($ENV{PERL_CORE}) { + unless ($ENV{PERL_TEST_Net_Ping}) { + print "1..0 # Skip: network dependent test\n"; + exit; + } + chdir 't' if -d 't'; + @INC = qw(../lib); + } +} + # Remote network test using tcp protocol. # # NOTE: