5 $ignoreBogusOutput = 0;
6 $filePattern = "runtests.*.status";
12 if (/^--?ignorebogus/) {
13 $ignoreBogusOutput = 1;
16 print STDERR "checktests [ -ignorebogus ]\n";
21 open( RESULTS, "ls -1 $filePattern |" ) || die "Cannot list directory using ls -1 $filePattern\n";
26 $resultsFile = $statusFile;
27 $resultsFile =~ s/\.status/.out/;
29 if ($resultsFile =~ /runtests\.([0-9]+)\.out/) {
34 print STDERR "Unable to determine test number from $resultsFile!\n";
38 open (SFD, "<$statusFile" );
45 if (-s $resultsFile) {
46 open (RFD, "<$resultsFile");
49 # Successful output should contain ONLY the line No Errors
53 if ($outLine =~ /^\s+No [Ee]rrors\s*$/) {
57 # To filter out output that may be added to STDOUT
58 # by a badly behaved runtime system, you can either
59 # add a specific filter here (preferred) or set the
60 # -ignorebogus option (considered a workaround)
61 # The following is an example that accepts certain
62 # kinds of output once "No Errors" is seen.
64 if ( /^Application [0-9]+ resources: utime .*/) {
68 if (!$ignoreBogusOutput) {
69 # Any extraneous output is an error
75 if ($sawNoerrors == 1 && $testStatus == 0) {
79 # Test wrote No Errors but then exited with a non-zero status
83 print STDOUT "Test $count failed:\n";
84 print STDOUT "Test status: $testStatus\n";
85 print STDOUT "Test output:\n";
86 system ("cat $resultsFile" );
91 print STDERR "No $resultsFile\n" if $debug;
96 print "Tests passed: $testsPassed; test failed: $testsFailed\n";