X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/aa14a4cddcb96b681d5c19a2ec8bad382f43b264..fdc3e506a199dcfe32e748de4010e908f5825b37:/src/sod-test.asd diff --git a/src/sod-test.asd b/src/sod-test.asd index 38b5095..b3024dc 100644 --- a/src/sod-test.asd +++ b/src/sod-test.asd @@ -63,15 +63,13 @@ ;;; Testing. (defmethod perform ((op test-op) (system (eql (find-system "sod-test")))) - (operate 'load-op system) - (funcall (find-symbol "RUN-TESTS" "SOD-TEST"))) - -;;;-------------------------------------------------------------------------- -;;; Hacks. - -(defmethod perform :around - ((op compile-op) (component (eql (find-system "sod-test")))) - (let ((*compile-file-failure-behaviour* :warn)) - (call-next-method))) + (handler-bind (((or warning style-warning) + (lambda (cond) + (declare (ignore cond)) + (invoke-restart 'muffle-warning)))) + (operate 'load-op system) + (let ((result (funcall (find-symbol "RUN-TESTS" "SOD-TEST")))) + (unless (funcall (find-symbol "WAS-SUCCESSFUL" "XLUNIT") result) + (error "Failed test"))))) ;;;----- That's all, folks --------------------------------------------------