diff options
| author | Martin Schitter <ms@mur.at> | 2025-10-04 17:38:11 +0000 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2025-10-17 12:23:54 +0200 |
| commit | 590eb9ef40dd2b902f966dba285262d1a0d9df29 (patch) | |
| tree | 96dcd1b08e81132ccc4dba3e0e3e6581ba9446a4 /tests | |
| parent | f3b0398cf2c1616de90117243e381c04d944bf47 (diff) | |
tests: Increase test timeout and honor ‘GUIX_TESTS_BUILD_TIMEOUT’.
Rigid build time limits let some unit tests fail on slow hardware.
Set default timeout to 5 minutes and make it configurable via
`GUIX_TESTS_BUILD_TIMEOUT` environment variable.
* guix/tests.scm (%tests-build-timeout): New variable.
(open-connection-for-tests, call-with-external-store): Use it.
* tests/guix-environment-container.sh, tests/guix-home.sh,
tests/guix-pack-localstatedir.sh, tests/guix-pack-relocatable.sh: Use it to
define ‘GUIX_BUILD_OPTIONS’.
Change-Id: Iab63c2dcf4a3ad311a0cf2f39d7ea2ec158ddbb4
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/guix-environment-container.sh | 2 | ||||
| -rw-r--r-- | tests/guix-home.sh | 2 | ||||
| -rw-r--r-- | tests/guix-pack-localstatedir.sh | 2 | ||||
| -rw-r--r-- | tests/guix-pack-relocatable.sh | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/guix-environment-container.sh b/tests/guix-environment-container.sh index 411f07754eb..5b89f8383b6 100644 --- a/tests/guix-environment-container.sh +++ b/tests/guix-environment-container.sh @@ -230,7 +230,7 @@ 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" -GUIX_BUILD_OPTIONS="--timeout=180" # set an upper limit +GUIX_BUILD_OPTIONS="--timeout=`guile -c '(use-modules (guix tests))(display %tests-build-timeout)'`" export NIX_STORE_DIR GUIX_DAEMON_SOCKET GUIX_BUILD_OPTIONS if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))' diff --git a/tests/guix-home.sh b/tests/guix-home.sh index 76befed6135..38cf46f9e5c 100644 --- a/tests/guix-home.sh +++ b/tests/guix-home.sh @@ -39,7 +39,7 @@ 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" -GUIX_BUILD_OPTIONS="--timeout=180" # set an upper limit +GUIX_BUILD_OPTIONS="--timeout=`guile -c '(use-modules (guix tests))(display %tests-build-timeout)'`" export NIX_STORE_DIR GUIX_DAEMON_SOCKET GUIX_BUILD_OPTIONS # Run tests only when a "real" daemon is available. diff --git a/tests/guix-pack-localstatedir.sh b/tests/guix-pack-localstatedir.sh index c9e13bbc879..47e622dc2f5 100644 --- a/tests/guix-pack-localstatedir.sh +++ b/tests/guix-pack-localstatedir.sh @@ -31,7 +31,7 @@ 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" -GUIX_BUILD_OPTIONS="--timeout=180" # set an upper limit +GUIX_BUILD_OPTIONS="--timeout=`guile -c '(use-modules (guix tests))(display %tests-build-timeout)'`" export NIX_STORE_DIR GUIX_DAEMON_SOCKET GUIX_BUILD_OPTIONS if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))' diff --git a/tests/guix-pack-relocatable.sh b/tests/guix-pack-relocatable.sh index 228954bd9d7..bcec40c3a5b 100644 --- a/tests/guix-pack-relocatable.sh +++ b/tests/guix-pack-relocatable.sh @@ -32,7 +32,7 @@ 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" -GUIX_BUILD_OPTIONS="--timeout=180" +GUIX_BUILD_OPTIONS="--timeout=`guile -c '(use-modules (guix tests))(display %tests-build-timeout)'`" export NIX_STORE_DIR GUIX_DAEMON_SOCKET GUIX_BUILD_OPTIONS if ! guile -c '(use-modules (guix)) (exit (false-if-exception (open-connection)))' |
