build-system/clojure: Exit with non-zero if tests fail.

* guix/build/clojure-build-system.scm (check): Exit test process with a
non-zero exit code if tests fail.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Reily Siegel 2022-01-15 20:03:25 -05:00 committed by Ludovic Courtès
parent 008215c193
commit 09b4d74bd3
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -78,8 +78,11 @@ (define* (check #:key
(for-each (lambda (jar)
(eval-with-clojure `(do (apply require
'(clojure.test ,@libs*))
(apply clojure.test/run-tests
',libs*))
(if (clojure.test/successful?
(apply clojure.test/run-tests
',libs*))
(System/exit 0)
(System/exit 1)))
(cons jar test-dirs)))
jar-names)))
#t)