diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-07-05 07:28:59 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-07-05 07:28:59 +0000 |
commit | 8ba9dee36046939ca96a462c19c93dee3e0d9d52 (patch) | |
tree | c7fa86ab6faeb14a87ce6da74ed5bb78320f73b5 /t | |
parent | 86959918b69bd7566746d776574341f410f68755 (diff) | |
parent | 59c10aa22854831f97f41f8f8237b4d9b2426b0f (diff) | |
download | perl-8ba9dee36046939ca96a462c19c93dee3e0d9d52.tar.gz |
Integrate with mainperl.
p4raw-id: //depot/cfgperl@3585
Diffstat (limited to 't')
-rwxr-xr-x | t/TEST | 3 | ||||
-rwxr-xr-x | t/UTEST | 3 | ||||
-rw-r--r-- | t/harness | 59 | ||||
-rwxr-xr-x | t/io/openpid.t | 5 | ||||
-rwxr-xr-x | t/op/magic.t | 8 |
5 files changed, 47 insertions, 31 deletions
@@ -43,6 +43,9 @@ TESTING COMPILER -------------------------------------------------------------------------------- EOT + $ENV{COMPILE_TIMEOUT} = 120 + if ($type eq 'compile' && !$ENV{COMPILE_TIMEOUT}); + $bad = 0; $good = 0; $total = @tests; @@ -55,6 +55,9 @@ TESTING COMPILER -------------------------------------------------------------------------------- EOT + $ENV{COMPILE_TIMEOUT} = 120 + if ($type eq 'compile' && !$ENV{COMPILE_TIMEOUT}); + $bad = 0; $good = 0; $total = @tests; @@ -6,13 +6,13 @@ BEGIN { chdir 't' if -d 't'; unshift @INC, '../lib'; - $ENV{PERL5LIB} = '../lib'; # so children will see it too + $ENV{PERL5LIB} = '../lib'; # so children will see it too } use lib '../lib'; use Test::Harness; -$Test::Harness::switches = ""; # Too much noise otherwise +$Test::Harness::switches = ""; # Too much noise otherwise $Test::Harness::verbose = shift if @ARGV && $ARGV[0] eq '-v'; @tests = @ARGV; @@ -21,17 +21,18 @@ $Test::Harness::verbose = shift if @ARGV && $ARGV[0] eq '-v'; Test::Harness::runtests @tests; exit(0) unless -e "../testcompile"; -%infinite = qw( - op/bop.t 1 - lib/hostname.t 1 - ); #fudge DATA for now. +%infinite = qw ( + op/bop.t 1 + lib/hostname.t 1 + ); + %datahandle = qw( - lib/bigint.t 1 - lib/bigintpm.t 1 - lib/bigfloat.t 1 - lib/bigfloatpm.t 1 - ); + lib/bigint.t 1 + lib/bigintpm.t 1 + lib/bigfloat.t 1 + lib/bigfloatpm.t 1 + ); my $dhwrapper = <<'EOT'; open DATA,"<".__FILE__; @@ -40,22 +41,26 @@ EOT @tests = grep (!$infinite{$_}, @tests); @tests = map { - my $new = $_; - if ($datahandle{$_}) { - $new .= '.t'; - local(*F, *T); - open(F,"<$_") or die "Can't open $_: $!"; - open(T,">$new") or die "Can't open $new: $!"; - print T $dhwrapper, <F>; - close F; - close T; - } - $new; - } @tests; - -print "The tests ", join(' ', keys(%infinite)), - " generate infinite loops! Skipping!\n"; -$ENV{'COMPILE_TEST'} = 1; Test::Harness::runtests @tests; + my $new = $_; + if ($datahandle{$_}) { + $new .= '.t'; + local(*F, *T); + open(F,"<$_") or die "Can't open $_: $!"; + open(T,">$new") or die "Can't open $new: $!"; + print T $dhwrapper, <F>; + close F; + close T; + } + $new; + } @tests; + +print "The tests ", join(' ', keys(%infinite)), + " generate infinite loops! Skipping!\n"; + +$ENV{'COMPILE_TEST'} = 1; +$ENV{'COMPILE_TIMEOUT'} = 120 unless $ENV{'COMPILE_TIMEOUT'}; + +Test::Harness::runtests @tests; foreach (keys %datahandle) { unlink "$_.t"; } diff --git a/t/io/openpid.t b/t/io/openpid.t index 2d3ac9f32f..334bc0d65b 100755 --- a/t/io/openpid.t +++ b/t/io/openpid.t @@ -1,4 +1,3 @@ - #!./perl ##################################################################### @@ -55,7 +54,7 @@ chomp($from_pid1 = scalar(<FH1>)); print "# child1 returned [$from_pid1]\nnot " unless $from_pid1 eq 'first process'; print "ok 5\n"; -$kill_cnt = kill STOP, $pid1; +$kill_cnt = kill 'HUP', $pid1; print "not " unless $kill_cnt == 1; print "ok 6\n"; @@ -64,7 +63,7 @@ chomp($from_pid2 = scalar(<FH2>)); print "# child2 returned [$from_pid2]\nnot " unless $from_pid2 eq 'second process'; print "ok 7\n"; -$kill_cnt = kill STOP, $pid2, $pid3; +$kill_cnt = kill 'HUP', $pid2, $pid3; print "not " unless $kill_cnt == 2; print "ok 8\n"; diff --git a/t/op/magic.t b/t/op/magic.t index 17246f6b8a..31765e2c50 100755 --- a/t/op/magic.t +++ b/t/op/magic.t @@ -22,6 +22,7 @@ sub ok { $Is_MSWin32 = $^O eq 'MSWin32'; $Is_VMS = $^O eq 'VMS'; $Is_Dos = $^O eq 'dos'; +$Is_Cygwin = $^O =~ /cygwin/; $PERL = ($Is_MSWin32 ? '.\perl' : './perl'); print "1..35\n"; @@ -111,6 +112,11 @@ ok 18, $$ > 0, $$; if ($^O eq 'qnx') { chomp($wd = `/usr/bin/fullpath -t`); } + elsif($Is_Cygwin) { + # Cygwin turns the symlink into the real file + chomp($wd = `pwd`); + $wd =~ s#/t$##; + } else { $wd = '.'; } @@ -152,7 +158,7 @@ EOF ok 21, close(SCRIPT), $!; ok 22, chmod(0755, $script), $!; $_ = `$script`; - s/\.exe//i if $Is_Dos; + s/\.exe//i if $Is_Dos or $Is_Cygwin; s{\bminiperl\b}{perl}; # so that test doesn't fail with miniperl s{is perl}{is $perl}; # for systems where $^X is only a basename s{\\}{/}g; |