Silence two style warnings from the test harness.
authorLutz Euler <lutz.euler@freenet.de>
Thu, 8 Dec 2011 22:28:52 +0000 (23:28 +0100)
committerLutz Euler <lutz.euler@freenet.de>
Thu, 8 Dec 2011 22:28:52 +0000 (23:28 +0100)
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
tests/test-util.lisp

index 556b649..20c64b5 100644 (file)
             ,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
index 92a4b32..8381019 100644 (file)
     (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~:>"
 (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))