X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2FUTEST;h=d1ac2be81df872bf9da221e725299604e3b9afd0;hb=a4341a650d4ab04956b1f7ad537e1692aed7ed15;hp=b5f285bd59990ddc8a4ca1c49d69e5241f6d9ddd;hpb=c529f79d594c53d3968d464c57ac24a21137dd09;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/UTEST b/t/UTEST index b5f285b..d1ac2be 100755 --- a/t/UTEST +++ b/t/UTEST @@ -79,9 +79,16 @@ EOT -x $test || (print "isn't executable.\n"); if ($type eq 'perl') { - open(RESULTS, "./$test |") || (print "can't run.\n"); } + my $run = "./$test |"; + open(RESULTS, $run) || (print "can't run '$run': $!\n"); + } else { - open(RESULTS, "./perl -I../lib ../utils/perlcc ./$test -run -verbose dcf -log ../compilelog |") or print "can't compile.\n"; + my $compile = + "./perl -I../lib ../utils/perlcc -o ./$test.plc ./$test " + ." && ./$test.plc |"; + open(RESULTS, $compile) + or print "can't compile '$compile': $!.\n"; + unlink "./$test.plc"; } } else { @@ -100,10 +107,14 @@ EOT } if ($type eq 'perl') { - open(RESULTS,"./perl$switch -I../lib -Mutf8 $test |") || (print "can't run.\n"); + my $run = "./perl$switch -I../lib -Mutf8 $test |"; + open(RESULTS, $run) or + print "can't run '$run': $!.\n"; } else { - open(RESULTS, "./perl -I../lib ../utils/perlcc -Mutf8 ./$test -run -verbose dcf -log ../compilelog |") or print "can't compile.\n"; + my $compile = "./perl -I../lib ../utils/perlcc -Mutf8 ./$test -run -verbose dcf -log ../compilelog |"; + open(RESULTS, $compile) or + print "can't compile '$compile': $!.\n"; } } $ok = 0; @@ -124,6 +135,9 @@ EOT $next = $1, $ok = 0, last if /^not ok ([0-9]*)/; if (/^ok (\d+)(\s*#.*)?$/ && $1 == $next) { $next = $next + 1; + } + elsif (/^Bail out!\s*(.*)/i) { # magic words + die "FAILED--Further testing stopped" . ($1 ? ": $1\n" : ".\n"); } else { $ok = 0;