0.9.9.3:
authorJuho Snellman <jsnell@iki.fi>
Thu, 26 Jan 2006 23:16:13 +0000 (23:16 +0000)
committerJuho Snellman <jsnell@iki.fi>
Thu, 26 Jan 2006 23:16:13 +0000 (23:16 +0000)
        Make the handling of errors outside WITH-TEST forms more
        robust.

tests/run-tests.lisp
version.lisp-expr

index d01a33b..f1a046f 100644 (file)
     (dolist (file files)
       (when (accept-test-file file)
         (format t "// Running ~a~%" file)
-        (handler-bind ((error (make-error-handler file)))
-          (funcall test-fun file))))
+        (restart-case
+            (handler-bind ((error (make-error-handler file)))
+              (funcall test-fun file))
+          (skip-file ()))))
     (append-failures)))
 
 (defun impure-runner (files test-fun)
         (let ((pid (sb-posix:fork)))
           (cond ((= pid 0)
                  (format t "// Running ~a~%" file)
-                 (handler-bind ((error (make-error-handler file)))
-                   (funcall test-fun file))
+                 (restart-case
+                     (handler-bind ((error (make-error-handler file)))
+                       (funcall test-fun file))
+                   (skip-file ()
+                     (format t ">>>~a<<<~%" *failures*)))
                  (report-test-status)
                  (sb-ext:quit :unix-status 104))
                 (t
 
 (defun make-error-handler (file)
   (lambda (condition)
-    (push (list :unhandled-error file)
-          *all-failures*)
+    (push (list :unhandled-error file) *failures*)
     (cond (*break-on-error*
            (test-util:really-invoke-debugger condition))
           (t
            (format *error-output* "~&Unhandled ~a: ~a~%"
                    (type-of condition) condition)
-           (sb-debug:backtrace)))))
+           (sb-debug:backtrace)))
+    (invoke-restart 'skip-file)))
 
 (defun append-failures (&optional (failures *failures*))
   (setf *all-failures* (append failures *all-failures*)))
index 6a4fd7e..67d4007 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.9.2"
+"0.9.9.3"