mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
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.
This commit is contained in:
parent
16e7afb924
commit
df6f86a0cb
1 changed files with 4 additions and 2 deletions
|
@ -41,12 +41,14 @@ guix pack --bootstrap guile-bootstrap
|
||||||
# Build a tarball with a symlink.
|
# Build a tarball with a symlink.
|
||||||
the_pack="`guix pack --bootstrap -S /opt/gnu/bin=bin guile-bootstrap`"
|
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`"
|
test_directory="`mktemp -d`"
|
||||||
trap 'rm -rf "$test_directory"' EXIT
|
trap 'rm -rf "$test_directory"' EXIT
|
||||||
cd "$test_directory"
|
cd "$test_directory"
|
||||||
tar -xf "$the_pack"
|
tar -xf "$the_pack"
|
||||||
test -x opt/gnu/bin/guile
|
test -L opt/gnu/bin
|
||||||
|
|
||||||
is_available () {
|
is_available () {
|
||||||
# Use the "type" shell builtin to see if the program is on PATH.
|
# Use the "type" shell builtin to see if the program is on PATH.
|
||||||
|
|
Loading…
Reference in a new issue