This seems to be a stage sane and stable enough to checkin.
[p5sagit/p5-mst-13.2.git] / t / UTEST
diff --git a/t/UTEST b/t/UTEST
index 4fc160d..1be1a5b 100755 (executable)
--- a/t/UTEST
+++ b/t/UTEST
@@ -55,6 +55,9 @@ TESTING COMPILER
 --------------------------------------------------------------------------------
 EOT
 
+    $ENV{PERLCC_TIMEOUT} = 120 
+        if ($type eq 'compile' && !$ENV{PERLCC_TIMEOUT});
+
     $bad = 0;
     $good = 0;
     $total = @tests;
@@ -78,7 +81,10 @@ EOT
            if ($type eq 'perl') {
                open(RESULTS, "./$test |") || (print "can't run.\n"); }
            else { 
-               open(RESULTS, "./perl -I../lib ../utils/perlcc ./$test -run -verbose dcf -log ../compilelog |") or print "can't compile.\n";
+        open(RESULTS, "./perl -I../lib ../utils/perlcc -o ./$test.plc ./$test "
+                 ." && ./$test.plc |")
+        or print "can't compile.\n";
+        unlink "./$test.plc";
            }
        }
        else {
@@ -121,6 +127,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;