diff options
| -rw-r--r-- | test-env.in | 7 | ||||
| -rw-r--r-- | tests/guix-build.sh | 2 | ||||
| -rw-r--r-- | tests/guix-daemon.sh | 10 | ||||
| -rw-r--r-- | tests/guix-package.sh | 6 |
4 files changed, 18 insertions, 7 deletions
diff --git a/test-env.in b/test-env.in index 67f4f805fa9..799a62276f3 100644 --- a/test-env.in +++ b/test-env.in | |||
| @@ -108,8 +108,13 @@ unset LANGUAGE | |||
| 108 | LC_MESSAGES=C | 108 | LC_MESSAGES=C |
| 109 | export LC_MESSAGES | 109 | export LC_MESSAGES |
| 110 | 110 | ||
| 111 | # Disable grafts by default because they can cause things to be built | ||
| 112 | # regardless of '--dry-run'. | ||
| 113 | GUIX_BUILD_OPTIONS="--no-grafts" | ||
| 114 | export GUIX_BUILD_OPTIONS | ||
| 115 | |||
| 111 | # Ignore user settings. | 116 | # Ignore user settings. |
| 112 | unset GUIX_PACKAGE_PATH GUIX_BUILD_OPTIONS | 117 | unset GUIX_PACKAGE_PATH |
| 113 | 118 | ||
| 114 | storedir="@storedir@" | 119 | storedir="@storedir@" |
| 115 | prefix="@prefix@" | 120 | prefix="@prefix@" |
diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 347cdfa4e45..778911b2f8f 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh | |||
| @@ -207,7 +207,7 @@ guix build --file="$module_dir/gexp.scm" -d | |||
| 207 | guix build --file="$module_dir/gexp.scm" -d | grep 'gexp\.drv' | 207 | guix build --file="$module_dir/gexp.scm" -d | grep 'gexp\.drv' |
| 208 | 208 | ||
| 209 | # Using 'GUIX_BUILD_OPTIONS'. | 209 | # Using 'GUIX_BUILD_OPTIONS'. |
| 210 | GUIX_BUILD_OPTIONS="--dry-run" | 210 | GUIX_BUILD_OPTIONS="--dry-run --no-grafts" |
| 211 | export GUIX_BUILD_OPTIONS | 211 | export GUIX_BUILD_OPTIONS |
| 212 | 212 | ||
| 213 | guix build emacs | 213 | guix build emacs |
diff --git a/tests/guix-daemon.sh b/tests/guix-daemon.sh index 1f9c8682936..7122eed0e61 100644 --- a/tests/guix-daemon.sh +++ b/tests/guix-daemon.sh | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # GNU Guix --- Functional package management for GNU | 1 | # GNU Guix --- Functional package management for GNU |
| 2 | # Copyright © 2012, 2014, 2015 Ludovic Courtès <ludo@gnu.org> | 2 | # Copyright © 2012, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> |
| 3 | # | 3 | # |
| 4 | # This file is part of GNU Guix. | 4 | # This file is part of GNU Guix. |
| 5 | # | 5 | # |
| @@ -27,8 +27,9 @@ guix build --version | |||
| 27 | 27 | ||
| 28 | drv="`guix build emacs -d`" | 28 | drv="`guix build emacs -d`" |
| 29 | out="`guile -c ' \ | 29 | out="`guile -c ' \ |
| 30 | (use-modules (guix) (gnu packages emacs)) \ | 30 | (use-modules (guix) (guix grafts) (gnu packages emacs)) \ |
| 31 | (define store (open-connection)) \ | 31 | (define store (open-connection)) \ |
| 32 | (%graft? #f) | ||
| 32 | (display (derivation->output-path (package-derivation store emacs)))'`" | 33 | (display (derivation->output-path (package-derivation store emacs)))'`" |
| 33 | 34 | ||
| 34 | hash_part="`basename $out | cut -c 1-32`" | 35 | hash_part="`basename $out | cut -c 1-32`" |
| @@ -88,9 +89,12 @@ guix-daemon --no-substitutes --listen="$socket" --disable-chroot \ | |||
| 88 | daemon_pid=$! | 89 | daemon_pid=$! |
| 89 | 90 | ||
| 90 | guile -c " | 91 | guile -c " |
| 91 | (use-modules (guix) (guix tests) (srfi srfi-34)) | 92 | (use-modules (guix) (guix grafts) (guix tests) (srfi srfi-34)) |
| 92 | (define store (open-connection-for-tests \"$socket\")) | 93 | (define store (open-connection-for-tests \"$socket\")) |
| 93 | 94 | ||
| 95 | ;; Disable grafts to avoid building more than needed. | ||
| 96 | (%graft? #f) | ||
| 97 | |||
| 94 | (define (build-without-failing drv) | 98 | (define (build-without-failing drv) |
| 95 | (lambda (store) | 99 | (lambda (store) |
| 96 | (guard (c ((nix-protocol-error? c) (values #t store))) | 100 | (guard (c ((nix-protocol-error? c) (values #t store))) |
diff --git a/tests/guix-package.sh b/tests/guix-package.sh index cf1a185590c..d75008448b2 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh | |||
| @@ -261,7 +261,7 @@ unset GUIX_PACKAGE_PATH | |||
| 261 | 261 | ||
| 262 | # Using 'GUIX_BUILD_OPTIONS'. | 262 | # Using 'GUIX_BUILD_OPTIONS'. |
| 263 | available="`guix package -A | sort`" | 263 | available="`guix package -A | sort`" |
| 264 | GUIX_BUILD_OPTIONS="--dry-run" | 264 | GUIX_BUILD_OPTIONS="--dry-run --no-grafts" |
| 265 | export GUIX_BUILD_OPTIONS | 265 | export GUIX_BUILD_OPTIONS |
| 266 | 266 | ||
| 267 | # Make sure $GUIX_BUILD_OPTIONS is not simply appended to the command-line, | 267 | # Make sure $GUIX_BUILD_OPTIONS is not simply appended to the command-line, |
| @@ -270,7 +270,9 @@ available2="`guix package -A | sort`" | |||
| 270 | test "$available2" = "$available" | 270 | test "$available2" = "$available" |
| 271 | guix package -I | 271 | guix package -I |
| 272 | 272 | ||
| 273 | unset GUIX_BUILD_OPTIONS | 273 | # Restore '--no-grafts', which makes sure we don't end up building stuff when |
| 274 | # '--dry-run' is passed. | ||
| 275 | GUIX_BUILD_OPTIONS="--no-grafts" | ||
| 274 | 276 | ||
| 275 | # Applying a manifest file. | 277 | # Applying a manifest file. |
| 276 | cat > "$module_dir/manifest.scm"<<EOF | 278 | cat > "$module_dir/manifest.scm"<<EOF |
