From: Alastair Bridgewater Date: Mon, 5 Dec 2011 14:33:43 +0000 (-0500) Subject: tests: Add --report-skipped-tests option to the test runner. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=7c773fca12dce6fc78f07fb021d8562068ab5e7d;p=sbcl.git tests: Add --report-skipped-tests option to the test runner. * It is occasionally useful to see precisely which tests are skipped on a given target, and there was no obvious way to so do. --- diff --git a/NEWS b/NEWS index 7cdd4a7..e416553 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,9 @@ changes relative to sbcl-1.0.54: (Thanks to Attila Lendvai) * enhancement: BACKTRACE and DESCRIBE now bind *PRINT-CIRCLE* to T, and generally behave better when errors occur during printing. + * enhancement: the test runner now takes a --report-skipped-tests argument + to report the individual tests skipped as well as the number of skipped + tests. * optimization: the compiler is smarter about representation selection for floating point constants used in full calls. * optimization: the compiler no longer refuses to coerce large fixnums to diff --git a/tests/run-tests.lisp b/tests/run-tests.lisp index 0069333..556b649 100644 --- a/tests/run-tests.lisp +++ b/tests/run-tests.lisp @@ -17,6 +17,7 @@ (defvar *all-failures* nil) (defvar *break-on-error* nil) +(defvar *report-skipped-tests* nil) (defvar *accept-files* nil) (defun run-all () @@ -26,6 +27,8 @@ (setf test-util:*break-on-failure* t)) ((string= arg "--break-on-expected-failure") (setf test-util:*break-on-expected-failure* t)) + ((string= arg "--report-skipped-tests") + (setf *report-skipped-tests* t)) (t (push (truename (parse-namestring arg)) *accept-files*)))) (pure-runner (pure-load-files) #'load-test) @@ -54,6 +57,11 @@ "Invalid exit status:" (enough-namestring (second fail)))) ((eq (car fail) :skipped-disabled) + (when *report-skipped-tests* + (format t " ~20a ~a / ~a~%" + "Skipped (irrelevant):" + (enough-namestring (second fail)) + (third fail))) (incf skipcount)) (t (format t " ~20a ~a / ~a~%" diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 165afa8..0ea9c85 100644 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -2,10 +2,15 @@ # Run the regression tests in this directory. # -# Usage: run-tests.sh [--break-on-failure] [--break-on-expected-failure] [files] +# Usage: run-tests.sh [OPTIONS] [files] +# +# Valid options are as follows: +# # --break-on-failure Break into the debugger when a test fails # unexpectedly # --break-on-expected-failure Break into the debugger when any test fails +# --report-skipped-tests Include tests :skipped-on target SBCL in +# the test report. # # If no test files are specified, runs all tests.