summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2025-08-29 14:14:18 +0200
committerLudovic Courtès <ludo@gnu.org>2025-09-03 12:34:13 +0200
commit128f07cd011d37cd63b2650ffe798ff83f3d1803 (patch)
tree7b508b61dd88e3b11dfffef48f61babc4fb724fa /tests
parentf7f8db1d8c629b1a5313abf59ab78143cb7ac04d (diff)
tests: Pass ‘--timeout’ for builds with the host store.
This ensures ‘make check’ doesn’t accidentally start building the world. * tests/guix-environment-container.sh (GUIX_BUILD_OPTIONS): New environment variable. * tests/guix-home.sh (GUIX_BUILD_OPTIONS): Likewise. * tests/guix-pack-localstatedir.sh (GUIX_BUILD_OPTIONS): Likewise. * tests/guix-pack-relocatable.sh (GUIX_BUILD_OPTIONS): Likewise. Change-Id: If8afe9cfc5c0f1f72cd6f3d39dd5d4f6415d1e02
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-environment-container.sh3
-rw-r--r--tests/guix-home.sh3
-rw-r--r--tests/guix-pack-localstatedir.sh3
-rw-r--r--tests/guix-pack-relocatable.sh5
4 files changed, 9 insertions, 5 deletions
diff --git a/tests/guix-environment-container.sh b/tests/guix-environment-container.sh
index 220e6b8ec84..411f07754eb 100644
--- a/tests/guix-environment-container.sh
+++ b/tests/guix-environment-container.sh
@@ -230,7 +230,8 @@ storedir="`guile -c '(use-modules (guix config))(display %storedir)'`"
230localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`" 230localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`"
231NIX_STORE_DIR="$storedir" 231NIX_STORE_DIR="$storedir"
232GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket" 232GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket"
233export NIX_STORE_DIR GUIX_DAEMON_SOCKET 233GUIX_BUILD_OPTIONS="--timeout=180" # set an upper limit
234export NIX_STORE_DIR GUIX_DAEMON_SOCKET GUIX_BUILD_OPTIONS
234 235
235if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))' 236if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))'
236then 237then
diff --git a/tests/guix-home.sh b/tests/guix-home.sh
index b8d90196f1e..76befed6135 100644
--- a/tests/guix-home.sh
+++ b/tests/guix-home.sh
@@ -39,7 +39,8 @@ container_supported ()
39localstatedir="$(guile -c '(use-modules (guix config))(display %localstatedir)')" 39localstatedir="$(guile -c '(use-modules (guix config))(display %localstatedir)')"
40NIX_STORE_DIR="$(guile -c '(use-modules (guix config))(display %storedir)')" 40NIX_STORE_DIR="$(guile -c '(use-modules (guix config))(display %storedir)')"
41GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket" 41GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket"
42export NIX_STORE_DIR GUIX_DAEMON_SOCKET 42GUIX_BUILD_OPTIONS="--timeout=180" # set an upper limit
43export NIX_STORE_DIR GUIX_DAEMON_SOCKET GUIX_BUILD_OPTIONS
43 44
44# Run tests only when a "real" daemon is available. 45# Run tests only when a "real" daemon is available.
45if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))' 46if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))'
diff --git a/tests/guix-pack-localstatedir.sh b/tests/guix-pack-localstatedir.sh
index 042887ea9b3..c9e13bbc879 100644
--- a/tests/guix-pack-localstatedir.sh
+++ b/tests/guix-pack-localstatedir.sh
@@ -31,7 +31,8 @@ storedir="`guile -c '(use-modules (guix config))(display %storedir)'`"
31localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`" 31localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`"
32NIX_STORE_DIR="$storedir" 32NIX_STORE_DIR="$storedir"
33GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket" 33GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket"
34export NIX_STORE_DIR GUIX_DAEMON_SOCKET 34GUIX_BUILD_OPTIONS="--timeout=180" # set an upper limit
35export NIX_STORE_DIR GUIX_DAEMON_SOCKET GUIX_BUILD_OPTIONS
35 36
36if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))' 37if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))'
37then 38then
diff --git a/tests/guix-pack-relocatable.sh b/tests/guix-pack-relocatable.sh
index aea02e16f69..228954bd9d7 100644
--- a/tests/guix-pack-relocatable.sh
+++ b/tests/guix-pack-relocatable.sh
@@ -1,5 +1,5 @@
1# GNU Guix --- Functional package management for GNU 1# GNU Guix --- Functional package management for GNU
2# Copyright © 2018, 2019, 2020, 2023 Ludovic Courtès <ludo@gnu.org> 2# Copyright © 2018-2020, 2023, 2025 Ludovic Courtès <ludo@gnu.org>
3# Copyright © 2020 Eric Bavier <bavier@posteo.net> 3# Copyright © 2020 Eric Bavier <bavier@posteo.net>
4# 4#
5# This file is part of GNU Guix. 5# This file is part of GNU Guix.
@@ -32,7 +32,8 @@ storedir="`guile -c '(use-modules (guix config))(display %storedir)'`"
32localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`" 32localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`"
33NIX_STORE_DIR="$storedir" 33NIX_STORE_DIR="$storedir"
34GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket" 34GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket"
35export NIX_STORE_DIR GUIX_DAEMON_SOCKET 35GUIX_BUILD_OPTIONS="--timeout=180"
36export NIX_STORE_DIR GUIX_DAEMON_SOCKET GUIX_BUILD_OPTIONS
36 37
37if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))' 38if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))'
38then 39then