-} else {
- $pct = sprintf("%.2f", $good / $total * 100);
- if ($bad == 1) {
- warn "Failed 1 test, $pct% okay.\n";
- } else {
- die "Failed $bad/$total tests, $pct% okay.\n";
+ else {
+ $pct = $files ? sprintf("%.2f", ($files - $bad) / $files * 100) : "0.00";
+ if ($bad == 1) {
+ warn "Failed 1 test script out of $files, $pct% okay.\n";
+ }
+ else {
+ warn "Failed $bad test scripts out of $files, $pct% okay.\n";
+ }
+ warn <<'SHRDLU';
+ ### Since not all tests were successful, you may want to run some
+ ### of them individually and examine any diagnostic messages they
+ ### produce. See the INSTALL document's section on "make test".
+ ### If you are testing the compiler, then ignore this message
+ ### and run
+ ### ./perl harness
+ ### in the directory ./t.
+SHRDLU
+ warn <<'SHRDLU' if $good / $total > 0.8;
+ ###
+ ### Since most tests were successful, you have a good chance to
+ ### get information with better granularity by running
+ ### ./perl harness
+ ### in directory ./t.
+SHRDLU