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
This commit is contained in:
Ludovic Courtès 2025-08-29 14:14:18 +02:00
parent f7f8db1d8c
commit 128f07cd01
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
4 changed files with 9 additions and 5 deletions

View file

@ -230,7 +230,8 @@ storedir="`guile -c '(use-modules (guix config))(display %storedir)'`"
localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`"
NIX_STORE_DIR="$storedir"
GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket"
export NIX_STORE_DIR GUIX_DAEMON_SOCKET
GUIX_BUILD_OPTIONS="--timeout=180" # set an upper limit
export NIX_STORE_DIR GUIX_DAEMON_SOCKET GUIX_BUILD_OPTIONS
if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))'
then

View file

@ -39,7 +39,8 @@ container_supported ()
localstatedir="$(guile -c '(use-modules (guix config))(display %localstatedir)')"
NIX_STORE_DIR="$(guile -c '(use-modules (guix config))(display %storedir)')"
GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket"
export NIX_STORE_DIR GUIX_DAEMON_SOCKET
GUIX_BUILD_OPTIONS="--timeout=180" # set an upper limit
export NIX_STORE_DIR GUIX_DAEMON_SOCKET GUIX_BUILD_OPTIONS
# Run tests only when a "real" daemon is available.
if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))'

View file

@ -31,7 +31,8 @@ storedir="`guile -c '(use-modules (guix config))(display %storedir)'`"
localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`"
NIX_STORE_DIR="$storedir"
GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket"
export NIX_STORE_DIR GUIX_DAEMON_SOCKET
GUIX_BUILD_OPTIONS="--timeout=180" # set an upper limit
export NIX_STORE_DIR GUIX_DAEMON_SOCKET GUIX_BUILD_OPTIONS
if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))'
then

View file

@ -1,5 +1,5 @@
# GNU Guix --- Functional package management for GNU
# Copyright © 2018, 2019, 2020, 2023 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2018-2020, 2023, 2025 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2020 Eric Bavier <bavier@posteo.net>
#
# This file is part of GNU Guix.
@ -32,7 +32,8 @@ storedir="`guile -c '(use-modules (guix config))(display %storedir)'`"
localstatedir="`guile -c '(use-modules (guix config))(display %localstatedir)'`"
NIX_STORE_DIR="$storedir"
GUIX_DAEMON_SOCKET="$localstatedir/guix/daemon-socket/socket"
export NIX_STORE_DIR GUIX_DAEMON_SOCKET
GUIX_BUILD_OPTIONS="--timeout=180"
export NIX_STORE_DIR GUIX_DAEMON_SOCKET GUIX_BUILD_OPTIONS
if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))'
then