Commit a92d9328d7638b89eac9f233b6ca4b96e0869e2e
- Diff rendering mode:
- inline
- side by side
t/harness
(9 / 9)
|   | |||
| 21 | 21 | my $filename := $_; | |
| 22 | 22 | $total_files++; | |
| 23 | 23 | ||
| 24 | print($filename ~ '...'); | ||
| 24 | print("$filename ..."); | ||
| 25 | 25 | ||
| 26 | 26 | my $file := slurp($_); | |
| 27 | 27 | my $test_output := qx($EXECUTABLE_NAME, $filename); | |
| … | … | ||
| 44 | 44 | # strip out comments | |
| 45 | 45 | unless ($test_number > 0) { | |
| 46 | 46 | my @test_num_parts := split(' -',$test_number); | |
| 47 | $test_number := @test_num_parts[0]; | ||
| 47 | $test_number := @test_num_parts[0]; | ||
| 48 | 48 | } | |
| 49 | 49 | ||
| 50 | 50 | if ($line_parts[0] eq 'not ') { | |
| … | … | ||
| 57 | 57 | } | |
| 58 | 58 | } | |
| 59 | 59 | if ($failed) { | |
| 60 | say('failed ' ~ $failed ~ '/' ~ $num_tests ~ ' tests'); | ||
| 60 | say("failed $failed/$num_tests tests"); | ||
| 61 | 61 | } elsif ( @plan_parts[0] != 1 || $num_tests < 0) { | |
| 62 | say('INVALID PLAN: ' ~ join('',@plan_parts)); | ||
| 62 | say('INVALID PLAN: ', @plan_parts ); | ||
| 63 | 63 | $failed_files++; | |
| 64 | 64 | } else { | |
| 65 | say('passed ' ~ $curr_test ~ ' tests'); | ||
| 65 | say("passed $curr_test tests"); | ||
| 66 | 66 | } | |
| 67 | 67 | $total_passed := $total_passed + $passed; | |
| 68 | 68 | $total_failed := $total_failed + $failed; | |
| 69 | 69 | ||
| 70 | 70 | if ( $num_tests != $curr_test ) { | |
| 71 | say("Planned to run " ~ $num_tests ~ " tests but ran " ~ $curr_test ~ " tests"); | ||
| 71 | say("Planned to run $num_tests tests but ran $curr_test tests"); | ||
| 72 | 72 | say("FAILED"); | |
| 73 | 73 | } | |
| 74 | 74 | } | |
| 75 | 75 | if ($total_failed) { | |
| 76 | say("FAILED " ~ $total_failed ~ '/' ~ ($total_passed+$total_failed)); | ||
| 76 | say("FAILED $total_failed/",($total_passed+$total_failed)); | ||
| 77 | 77 | } elsif ($failed_files) { | |
| 78 | say("FAILED " ~ $failed_files ~ " files, PASSED " ~ $total_passed ~ ' tests'); | ||
| 78 | say("FAILED $failed_files files, PASSED $total_passed tests"); | ||
| 79 | 79 | } else { | |
| 80 | say("PASSED " ~ $total_passed ~ ' tests in ' ~ $total_files ~ ' files'); | ||
| 80 | say("PASSED $total_passed tests in $total_files files"); | ||
| 81 | 81 | } | |
| 82 | 82 | } |

