From d846159b81787f5fc74fca330a8e798f991673bd Mon Sep 17 00:00:00 2001 From: "Michael G. Schwern" Date: Tue, 13 Nov 2001 15:27:02 -0500 Subject: [PATCH] VMS fixups for IO::* tests Message-Id: <20011113202702.D32567@blackrider> p4raw-id: //depot/perl@12984 --- ext/IO/lib/IO/t/io_const.t | 8 ++++---- ext/IO/lib/IO/t/io_dir.t | 2 +- ext/IO/lib/IO/t/io_dup.t | 6 +++--- ext/IO/lib/IO/t/io_pipe.t | 1 - ext/IO/lib/IO/t/io_sock.t | 1 - ext/IO/lib/IO/t/io_unix.t | 1 - ext/IO/lib/IO/t/io_xs.t | 10 +++++++--- vms/test.com | 8 +------- 8 files changed, 16 insertions(+), 21 deletions(-) diff --git a/ext/IO/lib/IO/t/io_const.t b/ext/IO/lib/IO/t/io_const.t index db1a322..13bb65c 100755 --- a/ext/IO/lib/IO/t/io_const.t +++ b/ext/IO/lib/IO/t/io_const.t @@ -9,10 +9,10 @@ BEGIN { use Config; BEGIN { - if(-d "lib" && -f "TEST") { - if ($Config{'extensions'} !~ /\bIO\b/ && $^O ne 'VMS') { - print "1..0\n"; - exit 0; + if($ENV{PERL_CORE}) { + if ($Config{'extensions'} !~ /\bIO\b/) { + print "1..0 # Skip: IO extension not compiled\n"; + exit 0; } } } diff --git a/ext/IO/lib/IO/t/io_dir.t b/ext/IO/lib/IO/t/io_dir.t index 6ec4e9f..a6f03d0 100755 --- a/ext/IO/lib/IO/t/io_dir.t +++ b/ext/IO/lib/IO/t/io_dir.t @@ -7,7 +7,7 @@ BEGIN { } require Config; import Config; if ($] < 5.00326 || not $Config{'d_readdir'}) { - print "1..0\n"; + print "1..0 # Skip: readdir() not available\n"; exit 0; } } diff --git a/ext/IO/lib/IO/t/io_dup.t b/ext/IO/lib/IO/t/io_dup.t index 5db5ced..351a38d 100755 --- a/ext/IO/lib/IO/t/io_dup.t +++ b/ext/IO/lib/IO/t/io_dup.t @@ -10,9 +10,9 @@ BEGIN { use Config; BEGIN { - if(-d "lib" && -f "TEST") { - if ($Config{'extensions'} !~ /\bIO\b/ && $^O ne 'VMS') { - print "1..0\n"; + if($ENV{PERL_CORE}) { + if ($Config{'extensions'} !~ /\bIO\b/) { + print "1..0 # Skip: IO extension not compiled\n"; exit 0; } } diff --git a/ext/IO/lib/IO/t/io_pipe.t b/ext/IO/lib/IO/t/io_pipe.t index ae18224..a8bc483 100755 --- a/ext/IO/lib/IO/t/io_pipe.t +++ b/ext/IO/lib/IO/t/io_pipe.t @@ -18,7 +18,6 @@ BEGIN { elsif ($Config{'extensions'} !~ /\bIO\b/) { $reason = 'IO extension unavailable'; } - undef $reason if $^O eq 'VMS'; if ($reason) { print "1..0 # Skip: $reason\n"; exit 0; diff --git a/ext/IO/lib/IO/t/io_sock.t b/ext/IO/lib/IO/t/io_sock.t index 6b241c5..c4bfcc4 100755 --- a/ext/IO/lib/IO/t/io_sock.t +++ b/ext/IO/lib/IO/t/io_sock.t @@ -21,7 +21,6 @@ BEGIN { elsif ($Config{'extensions'} !~ /\bIO\b/) { $reason = 'IO extension unavailable'; } - undef $reason if $^O eq 'VMS' and $Config{d_socket}; if ($reason) { print "1..0 # Skip: $reason\n"; exit 0; diff --git a/ext/IO/lib/IO/t/io_unix.t b/ext/IO/lib/IO/t/io_unix.t index f120c97..e8ce473 100644 --- a/ext/IO/lib/IO/t/io_unix.t +++ b/ext/IO/lib/IO/t/io_unix.t @@ -30,7 +30,6 @@ BEGIN { } elsif ($^O =~ m/^(?:qnx|nto)$/ ) { $reason = 'Not implemented'; } - undef $reason if $^O eq 'VMS' and $Config{d_socket}; if ($reason) { print "1..0 # Skip: $reason\n"; exit 0; diff --git a/ext/IO/lib/IO/t/io_xs.t b/ext/IO/lib/IO/t/io_xs.t index 2449fc4..2ef9577 100644 --- a/ext/IO/lib/IO/t/io_xs.t +++ b/ext/IO/lib/IO/t/io_xs.t @@ -10,12 +10,16 @@ BEGIN { use Config; BEGIN { - if(-d "lib" && -f "TEST") { - if ($Config{'extensions'} !~ /\bIO\b/ && $^O ne 'VMS') { - print "1..0\n"; + if($ENV{PERL_CORE}) { + if ($Config{'extensions'} !~ /\bIO\b/) { + print "1..0 # Skip: IO extension not built\n"; exit 0; } } + if( $^O eq 'VMS' && $Config{'vms_cc_type'} ne 'decc' ) { + print "1..0 # Skip: not compatible with the VAXCRTL\n"; + exit 0; + } } use IO::File; diff --git a/vms/test.com b/vms/test.com index 62532f5..ac63c22 100644 --- a/vms/test.com +++ b/vms/test.com @@ -115,13 +115,7 @@ use Config; use File::Spec; @compexcl=('cpp.t'); -@libexcl=('io_pipe.t', 'io_poll.t', 'io_sel.t', - 'io_sock.t', 'io_unix.t'); - -# io_xs.t tests the new_tmpfile routine, which doesn't work with the -# VAXCRTL, since the file can't be stat()d, an Perl's do_open() -# insists on stat()ing a file descriptor before it'll use it. -push(@libexcl,'io_xs.t') if $Config{'vms_cc_type'} ne 'decc'; +@libexcl=('io_sel.t'); @opexcl=('die_exit.t','exec.t','groups.t','magic.t','stat.t'); @exclist=(@compexcl,@ioexcl,@libexcl,@opexcl); -- 2.7.4