From fb56427f3e946aae6562e7c9cbc4636a754cd754 Mon Sep 17 00:00:00 2001 From: Juho Snellman Date: Thu, 26 Jan 2006 23:16:13 +0000 Subject: [PATCH] 0.9.9.3: Make the handling of errors outside WITH-TEST forms more robust. --- tests/run-tests.lisp | 19 ++++++++++++------- version.lisp-expr | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/run-tests.lisp b/tests/run-tests.lisp index d01a33b..f1a046f 100644 --- a/tests/run-tests.lisp +++ b/tests/run-tests.lisp @@ -71,8 +71,10 @@ (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) @@ -85,8 +87,11 @@ (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 @@ -104,14 +109,14 @@ (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*))) diff --git a/version.lisp-expr b/version.lisp-expr index 6a4fd7e..67d4007 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4