tests: Add --report-skipped-tests option to the test runner.
authorAlastair Bridgewater <nyef@kana.lisphacker.com>
Mon, 5 Dec 2011 14:33:43 +0000 (09:33 -0500)
committerAlastair Bridgewater <nyef@kana.lisphacker.com>
Mon, 5 Dec 2011 14:33:43 +0000 (09:33 -0500)
  * It is occasionally useful to see precisely which tests are
skipped on a given target, and there was no obvious way to so do.

NEWS
tests/run-tests.lisp
tests/run-tests.sh

diff --git a/NEWS b/NEWS
index 7cdd4a7..e416553 100644 (file)
--- 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
index 0069333..556b649 100644 (file)
@@ -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)
                             "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~%"
index 165afa8..0ea9c85 100644 (file)
@@ -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.