projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.27.30: minor octets.lisp cleanup
[sbcl.git]
/
tests
/
test-util.lisp
diff --git
a/tests/test-util.lisp
b/tests/test-util.lisp
index
e49c627
..
7ef6b6b
100644
(file)
--- a/
tests/test-util.lisp
+++ b/
tests/test-util.lisp
@@
-12,6
+12,12
@@
(defvar *break-on-failure* nil)
(defvar *break-on-expected-failure* nil)
(defvar *break-on-failure* nil)
(defvar *break-on-expected-failure* nil)
+(defun log-msg (&rest args)
+ (format *trace-output* "~&::: ")
+ (apply #'format *trace-output* args)
+ (terpri *trace-output*)
+ (force-output *trace-output*))
+
(defmacro with-test ((&key fails-on name) &body body)
(let ((block-name (gensym)))
`(block ,block-name
(defmacro with-test ((&key fails-on name) &body body)
(let ((block-name (gensym)))
`(block ,block-name
@@
-21,10
+27,12
@@
(fail-test :unexpected-failure ',name error))
(return-from ,block-name))))
(progn
(fail-test :unexpected-failure ',name error))
(return-from ,block-name))))
(progn
+ (log-msg "Running ~S" ',name)
(start-test)
,@body
(start-test)
,@body
- (when (expected-failure-p ,fails-on)
- (fail-test :unexpected-success ',name nil)))))))
+ (if (expected-failure-p ,fails-on)
+ (fail-test :unexpected-success ',name nil)
+ (log-msg "Success ~S" ',name)))))))
(defun report-test-status ()
(with-standard-io-syntax
(defun report-test-status ()
(with-standard-io-syntax
@@
-40,6
+48,7
@@
(incf *test-count*))
(defun fail-test (type test-name condition)
(incf *test-count*))
(defun fail-test (type test-name condition)
+ (log-msg "~A ~S" type test-name)
(push (list type *test-file* (or test-name *test-count*))
*failures*)
(when (or (and *break-on-failure*
(push (list type *test-file* (or test-name *test-count*))
*failures*)
(when (or (and *break-on-failure*