From e948e3c3634d2fc3bd48d81ab3012e2f85b83cf4 Mon Sep 17 00:00:00 2001 From: Russ Tyndall Date: Tue, 16 Oct 2012 16:37:43 -0400 Subject: [PATCH] updated for new lisp-unit --- tests/setup.lisp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/tests/setup.lisp b/tests/setup.lisp index e814ae6..dd3774c 100644 --- a/tests/setup.lisp +++ b/tests/setup.lisp @@ -48,19 +48,21 @@ ))) (defun run-tests (&key suites tests (use-debugger T)) - (let* ((*package* (find-package :cl-mediawiki-test)) + (let* ((*package* (find-package :buildnode-test)) + (lisp-unit:*print-failures* t) + (lisp-unit:*print-errors* t) (lisp-unit::*use-debugger* use-debugger) (tests (append (alexandria:ensure-list tests) (loop for suite in (alexandria:ensure-list suites) - appending (get suite :tests)))) - (out (with-output-to-string (*standard-output*) - (lisp-unit::run-test-thunks - (lisp-unit::get-test-thunks - (if (null tests) - (get-tests *package*) - tests)))))) - + appending (get suite :tests)))) + (actual-std-out *standard-output*) + (out (with-output-to-string (s) + (let ((*standard-output* + (make-broadcast-stream s actual-std-out))) + (if (null tests) + (lisp-unit::%run-all-thunks) + (lisp-unit::%run-thunks tests)))))) (format *standard-output* - "~&~% ** TEST RESULTS: Cl-Mediawiki ** ~%-----------~%~A~%------ END TEST RESULTS ------~%" - out))) + "~&~% ** TEST RESULTS: CL-MEDIAWIKI ** ~%-----------~%~A~%------ END TEST RESULTS ------~%" + out)))