diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 2001-12-18 21:45:41 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-19 15:04:03 +0000 |
commit | dfcfdb64cf0cdaf3745a1082d9b4a94480414c62 (patch) | |
tree | dfc2125707e6a7bfbab5dcff74d64102e2c0509d /lib | |
parent | 505f3f16d6d7a74e8cf7e8f3a785787b06f153f9 (diff) | |
download | perl-dfcfdb64cf0cdaf3745a1082d9b4a94480414c62.tar.gz |
OS/2 build
Message-ID: <20011219024541.A29803@math.ohio-state.edu>
(skipped the t/TEST change)
p4raw-id: //depot/perl@13805
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/English.t | 2 | ||||
-rw-r--r-- | lib/ExtUtils/t/Embed.t | 7 | ||||
-rw-r--r-- | lib/File/stat.t | 2 | ||||
-rw-r--r-- | lib/Shell.t | 10 |
4 files changed, 16 insertions, 5 deletions
diff --git a/lib/English.t b/lib/English.t index 745d42ee2a..6e11dcc686 100755 --- a/lib/English.t +++ b/lib/English.t @@ -85,7 +85,7 @@ is( $PERL_VERSION, $^V, '$PERL_VERSION' ); is( $DEBUGGING, $^D, '$DEBUGGING' ); is( $WARNING, 0, '$WARNING' ); -like( $EXECUTABLE_NAME, qr/perl/, '$EXECUTABLE_NAME' ); +like( $EXECUTABLE_NAME, qr/perl/i, '$EXECUTABLE_NAME' ); is( $OSNAME, $Config{osname}, '$OSNAME' ); # may be non-portable diff --git a/lib/ExtUtils/t/Embed.t b/lib/ExtUtils/t/Embed.t index 24b6a17362..1f23909cb5 100644 --- a/lib/ExtUtils/t/Embed.t +++ b/lib/ExtUtils/t/Embed.t @@ -16,7 +16,9 @@ $| = 1; print "1..9\n"; my $cc = $Config{'cc'}; my $cl = ($^O eq 'MSWin32' && $cc eq 'cl'); -my $exe = 'embed_test' . $Config{'exe_ext'}; +my $skip_exe = $^O eq 'os2' && $Config{ldflags} =~ /(?<!\S)-Zexe\b/; +my $exe = 'embed_test'; +$exe .= $Config{'exe_ext'} unless $skip_exe; # Linker will auto-append it my $obj = 'embed_test' . $Config{'obj_ext'}; my $inc = File::Spec->updir; my $lib = File::Spec->updir; @@ -70,6 +72,8 @@ if ($^O eq 'VMS') { local $SIG{__WARN__} = sub { warn $_[0] unless $_[0] =~ /No library found for -lperl/ }; + push(@cmd, '-Zlinker', '/PM:VIO') # Otherwise puts a warning to STDOUT! + if $^O eq 'os2' and $Config{ldflags} =~ /(?<!\S)-Zomf\b/; push(@cmd,ldopts()); } @@ -118,6 +122,7 @@ print "# embed_test = $embed_test\n"; $status = system($embed_test); print (($status? 'not ':'')."ok 9 # $status\n"); unlink($exe,"embed_test.c",$obj); +unlink("$exe$Config{exe_ext}") if $skip_exe; unlink("embed_test.map","embed_test.lis") if $^O eq 'VMS'; unlink(glob("./libperl*.dll")) if $^O eq 'cygwin'; unlink("../libperl.a") if $^O eq 'cygwin'; diff --git a/lib/File/stat.t b/lib/File/stat.t index 8215f45d87..0487b8b51a 100644 --- a/lib/File/stat.t +++ b/lib/File/stat.t @@ -30,7 +30,7 @@ is( $stat->dev, $stat[0], "device number in position 0" ); # On OS/2 (fake) ino is not constant, it is incremented each time SKIP: { - skip(1, 'inode number is not constant on OS/2') if $^O eq 'os2'; + skip('inode number is not constant on OS/2', 1) if $^O eq 'os2'; is( $stat->ino, $stat[1], "inode number in position 1" ); } diff --git a/lib/Shell.t b/lib/Shell.t index 837f6aca88..b2d3d67aa0 100644 --- a/lib/Shell.t +++ b/lib/Shell.t @@ -1,5 +1,10 @@ #!./perl +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + use Test::More tests => 4; BEGIN { use_ok('Shell'); } @@ -19,7 +24,7 @@ while ( -f $tmpfile ) $tmpfile++; } -END { -f $tmpfile && unlink $tmpfile }; +END { -f $tmpfile && (open STDERR, '>&SAVERR' and unlink $tmpfile) }; @@ -28,7 +33,8 @@ open(STDERR, ">$tmpfile"); xXx(); # Ok someone could have a program called this :( -ok( !(-s $tmpfile) ,'$Shell::capture_stderr'); +# On os2 the warning is on by default... +ok( ($^O eq 'os2' xor !(-s $tmpfile)) ,'$Shell::capture_stderr'); $Shell::capture_stderr = 0; # |