unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Reily Siegel <mail@reilysiegel.com>
To: 53291@debbugs.gnu.org
Subject: [bug#53291] [PATCH] build: clojure-build-system: Exit with non-zero if tests fail.
Date: Sat, 15 Jan 2022 20:03:25 -0500	[thread overview]
Message-ID: <87sftoijaa.fsf@reilysiegel.com> (raw)


* 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




             reply	other threads:[~2022-01-16  1:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-16  1:03 Reily Siegel [this message]
2022-01-24  9:11 ` bug#53291: [PATCH] build: clojure-build-system: Exit with non-zero if tests fail Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sftoijaa.fsf@reilysiegel.com \
    --to=mail@reilysiegel.com \
    --cc=53291@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).