guix-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Ludovic Courtès
Date: Tue, 9 May 2023 10:28:16 -0400 (EDT)

branch: master
commit 899391215045513ddd708b12edade8de71e29b9e
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon May 8 23:21:02 2023 +0200

    base: Consider non-zero exit of 'cuirass evaluate' as failure.
    
    * src/cuirass/base.scm (evaluate): Check return value of 'close-pipe'.
    Consider non-zero exit status as a failure.
---
 src/cuirass/base.scm | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm
index 5c8ee14..4b5e7f7 100644
--- a/src/cuirass/base.scm
+++ b/src/cuirass/base.scm
@@ -1,5 +1,5 @@
 ;;; base.scm -- Cuirass base module
-;;; Copyright © 2016, 2017, 2018, 2019, 2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016-2019, 2022-2023 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016, 2017 Mathieu Lirzin <mthl@gnu.org>
 ;;; Copyright © 2017, 2020, 2021 Mathieu Othacehe <othacehe@gnu.org>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
@@ -302,16 +302,19 @@ Return a list of jobs that are associated to EVAL-ID."
                    ((? eof-object?)
                     (db-set-evaluation-status eval-id
                                               (evaluation-status failed))
-                    (close-port (cdr log-pipe))
-                    (raise (condition
-                            (&evaluation-error
-                             (name (specification-name spec))
-                             (id eval-id)))))
+                    #f)
                    (_ #t))))
     (close-port (cdr log-pipe))
-    (close-pipe port)
-    (let ((spec-name (specification-name spec)))
-      (log-info "evaluation ~a for '~a' completed" eval-id spec-name))))
+    (let ((spec-name (specification-name spec))
+          (status (close-pipe port)))
+      (if (and (zero? status) result)
+          (log-info "evaluation ~a for '~a' completed" eval-id spec-name)
+          (begin
+            (log-info "evaluation ~a for '~a' failed" eval-id spec-name)
+            (raise (condition
+                    (&evaluation-error
+                     (name (specification-name spec))
+                     (id eval-id)))))))))
 
 
 ;;;



reply via email to

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