aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-07-05 14:56:08 +0200
committerLudovic Courtès <ludo@gnu.org>2014-07-05 14:56:08 +0200
commit88371f0d7dcdbb1bd304073257e5214409e89c2f (patch)
tree1943dc4fea9f6b52e954497d1a845f19ecb08613 /tests
parente84d8b30d9ec17e1d1860a068e78631c35f6c334 (diff)
downloadpatches-88371f0d7dcdbb1bd304073257e5214409e89c2f.tar
patches-88371f0d7dcdbb1bd304073257e5214409e89c2f.tar.gz
guix package: Do the right thing for '-p ~/.guix-profile'.
Fixes <http://bugs.gnu.org/17939>. Reported by Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>. * guix/scripts/package.scm (canonicalize-profile): New procedure. (%options): Use it for --profile. * tests/guix-package.sh: Add test.
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-package.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index de545801de..c9e0c08a22 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -189,7 +189,7 @@ test "`readlink_base "$profile"`" = "$generation"
XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
export XDG_CACHE_HOME
-HOME="t-home-$$"
+HOME="$PWD/t-home-$$"
export HOME
mkdir -p "$HOME"
@@ -224,6 +224,15 @@ do
test "`readlink "$default_profile"`" = "$default_profile-0-link"
done
+# Check whether '-p ~/.guix-profile' makes any difference.
+# See <http://bugs.gnu.org/17939>.
+if test -e "$HOME/.guix-profile-0-link"; then false; fi
+if test -e "$HOME/.guix-profile-1-link"; then false; fi
+guix package --bootstrap -p "$HOME/.guix-profile" -i guile-bootstrap
+if test -e "$HOME/.guix-profile-1-link"; then false; fi
+guix package --bootstrap --roll-back -p "$HOME/.guix-profile"
+if test -e "$HOME/.guix-profile-0-link"; then false; fi
+
# Extraneous argument.
if guix package install foo-bar;
then false; else true; fi