diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-05-25 00:25:15 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-05-25 00:25:15 +0200 |
commit | 57df83e07d4b5e78d9a54c1a88d05b4a9ed65714 (patch) | |
tree | 76684e63965e9ad6e37d9d45bc3159e6c9782cd0 /tests/guix-pack.sh | |
parent | 43d9ed7792808638eabb43aa6133f1d6186c520b (diff) | |
parent | 136b7d81f0eb713783e9ea7cf7f260a2b6252dfd (diff) | |
download | guix-patches-57df83e07d4b5e78d9a54c1a88d05b4a9ed65714.tar guix-patches-57df83e07d4b5e78d9a54c1a88d05b4a9ed65714.tar.gz |
Merge branch 'staging' into core-updates
Diffstat (limited to 'tests/guix-pack.sh')
-rw-r--r-- | tests/guix-pack.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/guix-pack.sh b/tests/guix-pack.sh index a43f4d128f..0feae6d1e8 100644 --- a/tests/guix-pack.sh +++ b/tests/guix-pack.sh @@ -1,6 +1,6 @@ # GNU Guix --- Functional package management for GNU # Copyright © 2018 Chris Marusich <cmmarusich@gmail.com> -# Copyright © 2018 Ludovic Courtès <ludo@gnu.org> +# Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org> # # This file is part of GNU Guix. # @@ -33,6 +33,9 @@ guix pack --version GUIX_BUILD_OPTIONS="--no-substitutes" export GUIX_BUILD_OPTIONS +test_directory="`mktemp -d`" +trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT + # Build a tarball with no compression. guix pack --compression=none --bootstrap guile-bootstrap @@ -42,14 +45,18 @@ out2="`guix pack --bootstrap -e '(@ (gnu packages bootstrap) %bootstrap-guile)'` test -n "$out1" test "$out1" = "$out2" +# Test '--root'. +guix pack -r "$test_directory/my-guile" --bootstrap guile-bootstrap +test "`readlink "$test_directory/my-guile"`" = "$out1" +guix gc --list-roots | grep "^$test_directory/my-guile$" +rm "$test_directory/my-guile" + # Build a tarball with a symlink. the_pack="`guix pack --bootstrap -S /opt/gnu/bin=bin guile-bootstrap`" # 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 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT cd "$test_directory" tar -xf "$the_pack" test -L opt/gnu/bin @@ -59,7 +66,7 @@ is_available () { type "$1" > /dev/null } -if is_available chroot && is_available unshare; then +if is_available chroot && is_available unshare && unshare -r true; then # Verify we can use what we built. unshare -r chroot . /opt/gnu/bin/guile --version cd - |