gnu: notmuch: Update to 0.29.1.
[jackhill/guix/guix.git] / build-aux / run-system-tests.scm
index 8b44f57..18f7393 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,6 +19,7 @@
 (define-module (run-system-tests)
   #:use-module (gnu tests)
   #:use-module (guix store)
+  #:use-module ((guix status) #:select (with-status-verbosity))
   #:use-module (guix monads)
   #:use-module (guix derivations)
   #:use-module (guix ui)
@@ -29,7 +30,7 @@
 
 (define (built-derivations* drv)
   (lambda (store)
-    (guard (c ((nix-protocol-error? c)
+    (guard (c ((store-protocol-error? c)
                (values #f store)))
       (values (build-derivations store drv) store))))
 
           (length tests))
 
   (with-store store
-    (run-with-store store
-      (mlet* %store-monad ((drv (mapm %store-monad system-test-value tests))
-                           (out -> (map derivation->output-path drv)))
-        (mbegin %store-monad
-          (show-what-to-build* drv)
-          (set-build-options* #:keep-going? #t #:keep-failed? #t
-                              #:print-build-trace #t
-                              #:fallback? #t)
-          (built-derivations* drv)
-          (mlet %store-monad ((valid  (filterm (store-lift valid-path?)
-                                               out))
-                              (failed (filterm (store-lift
-                                                (negate valid-path?))
-                                               out)))
-            (format #t "TOTAL: ~a\n" (length drv))
-            (for-each (lambda (item)
-                        (format #t "PASS: ~a~%" item))
-                      valid)
-            (for-each (lambda (item)
-                        (format #t "FAIL: ~a~%" item))
-                      failed)
-            (exit (null? failed))))))))
+    (with-status-verbosity 2
+      (run-with-store store
+        (mlet* %store-monad ((drv (mapm %store-monad system-test-value tests))
+                             (out -> (map derivation->output-path drv)))
+          (mbegin %store-monad
+            (show-what-to-build* drv)
+            (set-build-options* #:keep-going? #t #:keep-failed? #t
+                                #:print-build-trace #t
+                                #:print-extended-build-trace? #t
+                                #:fallback? #t)
+            (built-derivations* drv)
+            (mlet %store-monad ((valid  (filterm (store-lift valid-path?)
+                                                 out))
+                                (failed (filterm (store-lift
+                                                  (negate valid-path?))
+                                                 out)))
+              (format #t "TOTAL: ~a\n" (length drv))
+              (for-each (lambda (item)
+                          (format #t "PASS: ~a~%" item))
+                        valid)
+              (for-each (lambda (item)
+                          (format #t "FAIL: ~a~%" item))
+                        failed)
+              (exit (null? failed)))))))))