summaryrefslogtreecommitdiff
path: root/tests/guix-daemon.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-03-02 14:44:18 +0100
committerLudovic Courtès <ludo@gnu.org>2016-03-02 14:47:07 +0100
commit442a6ff5eae094f1fd4e09241a2f35c33ab908da (patch)
treed4b142a289b584d54ca5fd8841c2ecb9aa87994c /tests/guix-daemon.sh
parent637cd1254320fd89fe6d910b3fa7665b19487072 (diff)
tests: Disable grafts by default.
Fixes <http://bugs.gnu.org/22872>. Reported by myglc2 <myglc2@gmail.com>. * test-env.in: Define and export 'GUIX_BUILD_OPTIONS'. * tests/guix-build.sh: When setting 'GUIX_BUILD_OPTIONS', make sure it contains '--no-grafts'. * tests/guix-package.sh: Likewise. * tests/guix-daemon.sh: Add (%graft? #f) in Scheme snippets.
Diffstat (limited to 'tests/guix-daemon.sh')
-rw-r--r--tests/guix-daemon.sh10
1 files changed, 7 insertions, 3 deletions
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
28drv="`guix build emacs -d`" 28drv="`guix build emacs -d`"
29out="`guile -c ' \ 29out="`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
34hash_part="`basename $out | cut -c 1-32`" 35hash_part="`basename $out | cut -c 1-32`"
@@ -88,9 +89,12 @@ guix-daemon --no-substitutes --listen="$socket" --disable-chroot \
88daemon_pid=$! 89daemon_pid=$!
89 90
90guile -c " 91guile -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)))