summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-02-12 15:26:35 +0100
committerLudovic Courtès <ludo@gnu.org>2022-02-14 11:23:07 +0100
commitef6d127190fed307f1ca52883b460a7ff53b317d (patch)
tree2b1447c72d674bbb2e38ab60205f925e68e047c4 /guix
parent03cde0f2880faca2c1e0d04f27e8905ce4274d6b (diff)
tests: Set a hard build timeout.
* guix/tests.scm (open-connection-for-tests): Pass #:timeout to 'set-build-options'. (call-with-external-store): Add call to 'set-build-options'.
Diffstat (limited to 'guix')
-rw-r--r--guix/tests.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/guix/tests.scm b/guix/tests.scm
index 06ef3cf76d..8f6d040f1f 100644
--- a/guix/tests.scm
+++ b/guix/tests.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013-2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2022 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -85,10 +85,12 @@
"warning: build daemon error: ~s~%" c)
#f))
(let ((store (open-connection uri)))
- ;; Make sure we build everything by ourselves.
+ ;; Make sure we build everything by ourselves. When we build something,
+ ;; it should take at most 5 minutes.
(set-build-options store
#:use-substitutes? #f
- #:substitute-urls (%test-substitute-urls))
+ #:substitute-urls (%test-substitute-urls)
+ #:timeout (* 5 60))
;; Use the bootstrap Guile when running tests, so we don't end up
;; building everything in the temporary test store.
@@ -147,6 +149,9 @@ no external store to talk to."
;; further.
(unsetenv "NIX_STORE_DIR"))
(lambda ()
+ (when store
+ ;; Make sure we don't end up rebuilding the world for those tests.
+ (set-build-options store #:timeout (* 10 60)))
(proc store))
(lambda ()
(when store-variable