From 9ef5527c3db71fcb3a98b5a37a1006789834ac0a Mon Sep 17 00:00:00 2001 From: Lutz Euler Date: Thu, 8 Dec 2011 23:28:52 +0100 Subject: [PATCH] Silence two style warnings from the test harness. Currently running any test emits a warning that REALLY-INVOKE-DEBUGGER is undefined. Running any test that uses IMPURE-RUNNER additionally emits a warning that *BREAK-ON-ERROR*'s lexical binding is used despite its name indicating specialness. Silence these two by moving the definition of REALLY-INVOKE-DEBUGGER before its use and by adding a SPECIAL declaration for *BREAK-ON-ERROR* in RUN-IMPURE-IN-CHILD-SBCL in a form that is executed in the child SBCL. --- tests/run-tests.lisp | 1 + tests/test-util.lisp | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/run-tests.lisp b/tests/run-tests.lisp index 556b649..20c64b5 100644 --- a/tests/run-tests.lisp +++ b/tests/run-tests.lisp @@ -128,6 +128,7 @@ ,test-util:*break-on-expected-failure*) (let ((file ,test-file) (*break-on-error* ,run-tests::*break-on-error*)) + (declare (special *break-on-error*)) (format t "// Running ~a~%" file) (restart-case (handler-bind diff --git a/tests/test-util.lisp b/tests/test-util.lisp index 92a4b32..8381019 100644 --- a/tests/test-util.lisp +++ b/tests/test-util.lisp @@ -54,6 +54,12 @@ (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) (if (stringp condition) (log-msg "~@<~A ~S ~:_~A~:>" @@ -77,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)) -- 1.7.10.4