3 my $interpreter = shift;
5 my $disabled_tests = shift;
7 my $stdout = $test.'.stdout';
8 my $stderr = $test.'.stderr';
10 $output =~ s/\.exe$/.output/;
13 print "Testing $test... ";
15 foreach $disabled (split (/ /, $disabled_tests)) {
16 if ($disabled eq $test) {
24 if (!defined ($cpid)) {
25 $res = system("$interpreter @ARGV $test 2>$stderr 1>$stdout");
26 } elsif ($cpid == 0) {
27 exec ("$interpreter @ARGV $test 2>$stderr 1>$stdout") || die "Cannot exec: $!";
29 # in the parent, setup the alarm
30 # test must complete in 2 minutes or it is considered buggy
34 print "failed after $timeout seconds timeout.\n";
45 printf ("failed $? (%d) signal (%d).\n", $?
>> 8, $?
& 127);
46 if (($?
& 127) == 2) {
52 if (-f
$output && (read_file
($output) ne read_file
($stdout))) {
53 print "failed output.\n";
64 open (F
, "<$out") || die $!;