summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2001-06-30 00:49:07 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-30 13:01:25 +0000
commit535acd0f3a0f42d4e249ba3d8b9709a328a8e6be (patch)
treeab64b8903213f3a9936e0b3e55e947bc392f7335 /lib
parentc74e5284dc2e0dcda5959a5a6ebd0b82a082ddad (diff)
downloadperl-535acd0f3a0f42d4e249ba3d8b9709a328a8e6be.tar.gz
(was Re: not OK: perl@11006 on HP-UX B.11.00)
Message-ID: <20010629234907.D59620@plum.flirble.org> p4raw-id: //depot/perl@11041
Diffstat (limited to 'lib')
-rw-r--r--lib/ExtUtils.t53
1 files changed, 34 insertions, 19 deletions
diff --git a/lib/ExtUtils.t b/lib/ExtUtils.t
index 9ab6acffc4..2ade74dd96 100644
--- a/lib/ExtUtils.t
+++ b/lib/ExtUtils.t
@@ -33,6 +33,7 @@ my @files;
print "# $dir being created...\n";
mkdir $dir, 0777 or die "mkdir: $!\n";
+my $output = "output";
END {
use File::Path;
@@ -157,8 +158,21 @@ open FH, ">$testpl" or die "open >$testpl: $!\n";
print FH "use strict;\n";
print FH "use $package qw(@names_only);\n";
-print FH <<'EOT';
+print FH <<"EOT";
+
+print "1..1\n";
+if (open OUTPUT, ">$output") {
+ print "ok 1\n";
+ select OUTPUT;
+} else {
+ print "not ok 1 # Failed to open '$output': $!\n";
+ exit 1;
+}
+EOT
+print FH << 'EOT';
+
+# What follows goes to the temporary file.
# IV
my $five = FIVE;
if ($five == 5) {
@@ -383,12 +397,13 @@ $make = $ENV{MAKE} if exists $ENV{MAKE};
if ($^O eq 'MSWin32' && $make eq 'nmake') { $make .= " -nologo"; }
-my $makeout;
+my @makeout;
print "# make = '$make'\n";
-$makeout = `$make`;
+@makeout = `$make`;
if ($?) {
print "not ok 3 # $make failed: $?\n";
+ print "# $_" foreach @makeout;
exit($?);
} else {
print "ok 3\n";
@@ -399,37 +414,36 @@ if ($Config{usedl}) {
} else {
my $makeperl = "$make perl";
print "# make = '$makeperl'\n";
- $makeout = `$makeperl`;
+ @makeout = `$makeperl`;
if ($?) {
print "not ok 4 # $makeperl failed: $?\n";
+ print "# $_" foreach @makeout;
exit($?);
} else {
print "ok 4\n";
}
}
-my $test = 23;
+push @files, $output;
+
my $maketest = "$make test";
print "# make = '$maketest'\n";
-$makeout = `$maketest`;
-
-# echo of running the test script
-$makeout =~ s/^\s*PERL_DL_NONLAZY=.+?\n//m;
-$makeout =~ s/^MCR.+test.pl\n//mig if $^O eq 'VMS';
-# GNU make babblings
-$makeout =~ s/^\w*?make.+?(?:entering|leaving) directory.+?\n//mig;
+@makeout = `$maketest`;
-# Hopefully gets most make's babblings
-# make -f Makefile.aperl perl
-$makeout =~ s/^\w*?make.+\sperl[^A-Za-z0-9]*\n//mig;
-# make[1]: `perl' is up to date.
-$makeout =~ s/^\w*?make.+perl.+?is up to date.*?\n//mig;
+if (open OUTPUT, "<$output") {
+ print while <OUTPUT>;
+ close OUTPUT or print "# Close $output failed: $!\n";
+} else {
+ # Harness will report missing test results at this point.
+ print "# Open <$output failed: $!\n";
+}
-print $makeout;
+my $test = 23;
if ($?) {
print "not ok $test # $maketest failed: $?\n";
+ print "# $_" foreach @makeout;
} else {
print "ok $test\n";
}
@@ -457,9 +471,10 @@ $test++;
my $makeclean = "$make clean";
print "# make = '$makeclean'\n";
-$makeout = `$makeclean`;
+@makeout = `$makeclean`;
if ($?) {
print "not ok $test # $make failed: $?\n";
+ print "# $_" foreach @makeout;
} else {
print "ok $test\n";
}