guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: guix-commits
Subject: 04/05: build-system/clojure: Exit with non-zero if tests fail.
Date: Mon, 24 Jan 2022 04:38:58 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 09b4d74bd352d40b45e081eaa094b086a42dad3d
Author: Reily Siegel <mail@reilysiegel.com>
AuthorDate: Sat Jan 15 20:03:25 2022 -0500

    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>
---
 guix/build/clojure-build-system.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/guix/build/clojure-build-system.scm 
b/guix/build/clojure-build-system.scm
index d8f7c89f85..dd01f95de8 100644
--- a/guix/build/clojure-build-system.scm
+++ b/guix/build/clojure-build-system.scm
@@ -78,8 +78,11 @@ priority over TEST-INCLUDE."
         (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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]