aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-pack.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-05-07 10:41:33 +0200
committerLudovic Courtès <ludo@gnu.org>2018-05-07 10:41:33 +0200
commitdf6f86a0cb652172329597701683cfa837ddced2 (patch)
tree80c2b4c650b9bd9499603823b9a7b677ed938b4a /tests/guix-pack.sh
parent16e7afb924deb145325144a2dcd0e2cc21228f89 (diff)
downloadguix-df6f86a0cb652172329597701683cfa837ddced2.tar
guix-df6f86a0cb652172329597701683cfa837ddced2.tar.gz
pack: Adjust test to cope with GC'd profiles.
Previous "test -x opt/gnu/bin/guile" would fail if the store item "opt/gnu/bin" points to had been GC'd. * tests/guix-pack.sh: Replace "test -x" with "test -L" to deal with store items that have been reclaimed.
Diffstat (limited to 'tests/guix-pack.sh')
-rw-r--r--tests/guix-pack.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/guix-pack.sh b/tests/guix-pack.sh
index 1b63b957be..d34f72015f 100644
--- a/tests/guix-pack.sh
+++ b/tests/guix-pack.sh
@@ -41,12 +41,14 @@ guix pack --bootstrap guile-bootstrap
# Build a tarball with a symlink.
the_pack="`guix pack --bootstrap -S /opt/gnu/bin=bin guile-bootstrap`"
-# Try to extract it.
+# Try to extract it. Note: we cannot test whether /opt/gnu/bin/guile itself
+# exists because /opt/gnu/bin may be an absolute symlink to a store item that
+# has been GC'd.
test_directory="`mktemp -d`"
trap 'rm -rf "$test_directory"' EXIT
cd "$test_directory"
tar -xf "$the_pack"
-test -x opt/gnu/bin/guile
+test -L opt/gnu/bin
is_available () {
# Use the "type" shell builtin to see if the program is on PATH.