From: Nicholas Clark Date: Fri, 29 Jun 2001 23:49:07 +0000 (+0100) Subject: (was Re: not OK: perl@11006 on HP-UX B.11.00) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=535acd0f3a0f42d4e249ba3d8b9709a328a8e6be;p=p5sagit%2Fp5-mst-13.2.git (was Re: not OK: perl@11006 on HP-UX B.11.00) Message-ID: <20010629234907.D59620@plum.flirble.org> p4raw-id: //depot/perl@11041 --- diff --git a/lib/ExtUtils.t b/lib/ExtUtils.t index 9ab6acf..2ade74d 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 ; + 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"; }