X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/dea4d05507e59ab779ed4bb209e05971d87e260c..61d083c621c983b7bb06a2d7f3d2dc2a80a442b7:/src/sod-test.asd diff --git a/src/sod-test.asd b/src/sod-test.asd index 17d6d40..b3024dc 100644 --- a/src/sod-test.asd +++ b/src/sod-test.asd @@ -51,26 +51,25 @@ ;; Test the parser edifice. (:module "parser" :depends-on ("test-base") :components - ((:file "test-parser") - (:file "test-scanner-charbuf"))) + ((:file "parser-test") + (:file "scanner-charbuf-test"))) ;; The actual tests. - (:file "test-c-types" :depends-on ("test-base")) - (:file "test-codegen" :depends-on ("test-base")))) + (:file "c-types-test" :depends-on ("test-base")) + (:file "codegen-test" :depends-on ("test-base")) + (:file "lexer-test" :depends-on ("test-base")))) ;;;-------------------------------------------------------------------------- ;;; 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 --------------------------------------------------