mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-12 22:26:40 -05:00
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'.
This commit is contained in:
parent
03cde0f288
commit
ef6d127190
1 changed files with 8 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; 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.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -85,10 +85,12 @@ (define* (open-connection-for-tests #:optional (uri (%daemon-socket-uri)))
|
||||||
"warning: build daemon error: ~s~%" c)
|
"warning: build daemon error: ~s~%" c)
|
||||||
#f))
|
#f))
|
||||||
(let ((store (open-connection uri)))
|
(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
|
(set-build-options store
|
||||||
#:use-substitutes? #f
|
#: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
|
;; Use the bootstrap Guile when running tests, so we don't end up
|
||||||
;; building everything in the temporary test store.
|
;; building everything in the temporary test store.
|
||||||
|
@ -147,6 +149,9 @@ (define store
|
||||||
;; further.
|
;; further.
|
||||||
(unsetenv "NIX_STORE_DIR"))
|
(unsetenv "NIX_STORE_DIR"))
|
||||||
(lambda ()
|
(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))
|
(proc store))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(when store-variable
|
(when store-variable
|
||||||
|
|
Loading…
Reference in a new issue