X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2FTEST;h=81d565099019c91787b4dd605bcb17713d1ae4df;hb=6ee623d521a149edc6574c512fa951a192cd086a;hp=a684b2ab655b7837b7e9eb9d1081589e715b0814;hpb=20408e3ccf502b6ce4033d8203710405ec9ef8f6;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/TEST b/t/TEST index a684b2a..81d5650 100755 --- a/t/TEST +++ b/t/TEST @@ -38,12 +38,34 @@ else { close(CONFIG); } -$bad = 0; -$good = 0; -$total = @ARGV; -$files = 0; -$totmax = 0; -while ($test = shift) { +%infinite = ( 'comp/require.t', 1, 'op/bop.t', 1, 'lib/hostname.t', 1 ); + +_testprogs('perl', @ARGV); +_testprogs('compile', @ARGV) if (-e "../testcompile"); + +sub _testprogs +{ + $type = shift @_; + @tests = @_; + + + print " +-------------------------------------------------------------------------------- +TESTING COMPILER +-------------------------------------------------------------------------------- +" if ($type eq 'compile'); + + $bad = 0; + $good = 0; + $total = @tests; + $files = 0; + $totmax = 0; +while ($test = shift @tests) { + + if ( $infinite{$test} && $type eq 'compile' ) { + print STDERR "$test creates infinite loop! Skipping.\n"; + next; + } if ($test =~ /^$/) { next; } @@ -52,7 +74,14 @@ while ($test = shift) { print "$te" . '.' x (18 - length($te)); if ($sharpbang) { -x $test || (print "isn't executable.\n"); - open(RESULTS,"./$test |") || (print "can't run.\n"); + + 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 |") + || (print "can't compile.\n"); + } } else { open(SCRIPT,"$test") || die "Can't run $test.\n"; $_ =