Commit 5b27393f authored by Carl Shapiro's avatar Carl Shapiro
Browse files

Guard against a division by zero in test run reports

parent a67cb2e8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -110,9 +110,10 @@
    (format t " ~5D tests failed~%" failed)
    (format t " ~5D tests with execution errors~%" execute-errors)
    (format t "~5,3f% of the tests passed~%"
	    (float (* 100
		      (- 1 (/ (+ failed execute-errors)
			      (+ passed failed execute-errors))))))
	    (let ((total (+ passed failed execute-errors)))
	      (if (zerop total)
		  0.0
		  (* 100.0 (- 1.0 (/ (- total passed) total))))))
    ;; Print some info about any failed tests.  Then exit.  We want to
    ;; set the exit code so that any scripts runnning this can
    ;; determine if there were any test failures.