X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Frun-tests.lisp;h=f1a046f6e51146d58a2ccd2f36d13c99052f430b;hb=444d2072bc52e60a41af62ee22e343e76109212f;hp=d01a33b9b6f4f2ddb3fa5bfddb389b0e5ade567e;hpb=ad0133544b3497c34e656ba2519cee5dfd70e828;p=sbcl.git 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*)))