From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtfxB-00071W-KZ for guix-patches@gnu.org; Sun, 17 Sep 2017 16:14:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtfx7-0003h7-R0 for guix-patches@gnu.org; Sun, 17 Sep 2017 16:14:09 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:36631) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dtfx7-0003gi-N9 for guix-patches@gnu.org; Sun, 17 Sep 2017 16:14:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dtfx7-0000Ew-Fh for guix-patches@gnu.org; Sun, 17 Sep 2017 16:14:05 -0400 Subject: [bug#28488] [PATCH 3/3] base: Show feedback when build has finished. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dtfvx-0006vi-8R for guix-patches@gnu.org; Sun, 17 Sep 2017 16:12:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dtfvs-00037w-7J for guix-patches@gnu.org; Sun, 17 Sep 2017 16:12:53 -0400 From: Jan Nieuwenhuizen Date: Sun, 17 Sep 2017 22:11:56 +0200 Message-Id: <20170917201157.9802-4-janneke@gnu.org> In-Reply-To: <20170917201157.9802-1-janneke@gnu.org> References: <20170917201157.9802-1-janneke@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28488@debbugs.gnu.org * src/cuirass/base.scm (build-packages): Print some feedback when derivations have been built. --- src/cuirass/base.scm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm index 1711c30..d1c8282 100644 --- a/src/cuirass/base.scm +++ b/src/cuirass/base.scm @@ -35,6 +35,7 @@ #:use-module (ice-9 threads) #:use-module (srfi srfi-1) #:use-module (srfi srfi-19) + #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:export (;; Procedures. @@ -218,13 +219,15 @@ directory and the sha1 of the top level commit in this directory." (#:timestamp . ,cur-time) (#:starttime . ,cur-time) (#:stoptime . ,cur-time)))) - (db-add-build db build)) - build)) + (db-add-build db build) + build))) ;; Pass all the jobs at once so we benefit from as much parallelism as ;; possible (we must be using #:keep-going? #t). Swallow build logs (the ;; daemon keeps them anyway), and swallow build errors. (guard (c ((nix-protocol-error? c) #t)) + (format #t "load-path=~s\n" %load-path) + (format #t "load-compiled-path=~s\n" %load-compiled-path) (format #t "building ~a derivations...~%" (length jobs)) (parameterize ((current-build-output-port (%make-void-port "w"))) (build-derivations store @@ -235,7 +238,15 @@ directory and the sha1 of the top level commit in this directory." ;; Register the results in the database. ;; XXX: The 'build-derivations' call is blocking so we end updating the ;; database potentially long after things have been built. - (map register jobs)) + (let* ((results (map register jobs)) + (status (map (cut assq-ref <> #:status) results)) + (success (length (filter zero? status))) + (outputs (map (cut assq-ref <> #:outputs) results)) + (outs (filter-map (cut assoc-ref <> "out") outputs)) + (fail (- (length jobs) success))) + (format #t "outputs:\n~a\n" (string-join outs "\n")) + (format #t "success: ~a, fail: ~a\n" success fail) + results)) (define (process-specs db jobspecs) "Evaluate and build JOBSPECS and store results in DB." -- Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com