diff options
author | Mark H Weaver <mhw@netris.org> | 2018-05-08 18:45:39 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2018-05-08 18:45:39 -0400 |
commit | aedc6e9fc952665e666f2febfc0b37235ad850ff (patch) | |
tree | 00d236f54b01e534b97b674673ca1ccd9b3cd18d /tests | |
parent | 69d5909e032e2fba57814ea9db52389d384d9341 (diff) | |
parent | f1f6f227264999bb362a95e6ec74badcb7de34db (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guix-pack.sh | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/guix-pack.sh b/tests/guix-pack.sh index 1b63b957be..5584c10e00 100644 --- a/tests/guix-pack.sh +++ b/tests/guix-pack.sh @@ -35,18 +35,23 @@ export GUIX_BUILD_OPTIONS # Build a tarball with no compression. guix pack --compression=none --bootstrap guile-bootstrap -# Build a tarball (with compression). -guix pack --bootstrap guile-bootstrap +# Build a tarball (with compression). Check that '-e' works as well. +out1="`guix pack --bootstrap guile-bootstrap`" +out2="`guix pack --bootstrap -e '(@ (gnu packages bootstrap) %bootstrap-guile)'`" +test -n "$out1" +test "$out1" = "$out2" # 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. @@ -81,3 +86,10 @@ guix pack --dry-run --bootstrap -f docker -S /opt/gnu=/ guile-bootstrap # Build a tarball pack of cross-compiled software. Use coreutils because # guile-bootstrap is not intended to be cross-compiled. guix pack --dry-run --bootstrap --target=arm-unknown-linux-gnueabihf coreutils + +# Make sure package transformation options are honored. +mkdir -p "$test_directory" +drv1="`guix pack -n guile 2>&1 | grep pack.*\.drv`" +drv2="`guix pack -n --with-source=guile=$test_directory guile 2>&1 | grep pack.*\.drv`" +test -n "$drv1" +test "$drv1" != "$drv2" |