X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-util.lisp;h=8381019c7be36d165902be558dfdd26ff3ab93ac;hb=b14aefb22fd710673b1a1005add3c0425713d2a0;hp=2e278ae27464bc6e3e17f6a6900b96ad7698acbe;hpb=69fe69971242dba6905e9c55f8ce6a9a93c9e403;p=sbcl.git diff --git a/tests/test-util.lisp b/tests/test-util.lisp index 2e278ae..8381019 100644 --- a/tests/test-util.lisp +++ b/tests/test-util.lisp @@ -54,15 +54,25 @@ (setf *test-count* 0)) (incf *test-count*)) +(defun really-invoke-debugger (condition) + (with-simple-restart (continue "Continue") + (let ((*invoke-debugger-hook* *invoke-debugger-hook*)) + (enable-debugger) + (invoke-debugger condition)))) + (defun fail-test (type test-name condition) - (log-msg "~@<~A ~S ~:_due to ~S: ~4I~:_\"~A\"~:>" - type test-name condition condition) + (if (stringp condition) + (log-msg "~@<~A ~S ~:_~A~:>" + type test-name condition) + (log-msg "~@<~A ~S ~:_due to ~S: ~4I~:_\"~A\"~:>" + type test-name condition condition)) (push (list type *test-file* (or test-name *test-count*)) *failures*) - (when (or (and *break-on-failure* - (not (eq type :expected-failure))) - *break-on-expected-failure*) - (really-invoke-debugger condition))) + (unless (stringp condition) + (when (or (and *break-on-failure* + (not (eq type :expected-failure))) + *break-on-expected-failure*) + (really-invoke-debugger condition)))) (defun expected-failure-p (fails-on) (sb-impl::featurep fails-on)) @@ -73,12 +83,6 @@ (defun skipped-p (skipped-on) (sb-impl::featurep skipped-on)) -(defun really-invoke-debugger (condition) - (with-simple-restart (continue "Continue") - (let ((*invoke-debugger-hook* *invoke-debugger-hook*)) - (enable-debugger) - (invoke-debugger condition)))) - (defun test-env () (cons (format nil "SBCL_MACHINE_TYPE=~A" (machine-type)) (cons (format nil "SBCL_SOFTWARE_TYPE=~A" (software-type))