GNU bug report logs - #53291
[PATCH] build: clojure-build-system: Exit with non-zero if tests fail.

Previous Next

Package: guix-patches;

Reported by: Reily Siegel <mail <at> reilysiegel.com>

Date: Sun, 16 Jan 2022 01:05:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Reily Siegel <mail <at> reilysiegel.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] build: clojure-build-system: Exit with non-zero if tests fail.
Date: Sat, 15 Jan 2022 20:03:25 -0500
* guix/build/clojure-build-system.scm (check): Exit test process with a
non-zero exit code if tests fail.
---
 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 91d6122afe..22e90581a5 100644
--- a/guix/build/clojure-build-system.scm
+++ b/guix/build/clojure-build-system.scm
@@ -99,8 +99,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)
-- 
2.34.0




This bug report was last modified 3 years and 176 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.