summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2018-12-17 22:47:44 +0100
committerLudovic Courtès <ludo@gnu.org>2018-12-17 23:33:42 +0100
commita93c1606312e41ffe509977502ce6055f40bc629 (patch)
tree3a42c61c631a1149591ee393df41a6f521ae601f /tests
parentbafcf1f32f3dfaf494d7640a3882585c143378cd (diff)
downloadpatches-a93c1606312e41ffe509977502ce6055f40bc629.tar
patches-a93c1606312e41ffe509977502ce6055f40bc629.tar.gz
environment: Support package transformation options.
Fixes <https://bugs.gnu.org/33776>. Reported by Adrien Guilbaud <adrien.guilbaud@inria.fr>. * guix/scripts/environment.scm (show-help): Add call to 'show-transformation-options-help'. (%options): Add %TRANSFORMATION-OPTIONS. (options/resolve-packages): Add 'store' parameter. [transform, package->manifest-entry*]: New procedures. Use 'package->manifest-entry*' instead of 'package->manifest-entry'. (guix-environment): Move definition of 'manifest' within 'with-store'. * tests/guix-environment.sh: Add test.
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-environment.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh
index b44aca099d..30b21028aa 100644
--- a/tests/guix-environment.sh
+++ b/tests/guix-environment.sh
@@ -1,5 +1,5 @@
# GNU Guix --- Functional package management for GNU
-# Copyright © 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
#
# This file is part of GNU Guix.
#
@@ -118,6 +118,18 @@ fi
# in its profile (e.g., for 'gzip'), but we have to accept them.
guix environment guix --bootstrap -n
+# Try program transformation options.
+mkdir "$tmpdir/emacs-36.8"
+drv="`guix environment --ad-hoc emacs -n 2>&1 | grep 'emacs.*\.drv'`"
+transformed_drv="`guix environment --ad-hoc emacs --with-source="$tmpdir/emacs-36.8" -n 2>&1 | grep 'emacs.*\.drv'`"
+test -n "$drv"
+test "$drv" != "$transformed_drv"
+case "$transformed_drv" in
+ *-emacs-36.8.drv) true;;
+ *) false;;
+esac
+rmdir "$tmpdir/emacs-36.8"
+
if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null
then
# Compute the build environment for the initial GNU Make.