diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-11-21 22:44:15 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-11-21 22:44:15 +0100 |
commit | b60d2bfff95c0859d7814c1fe9d0940c87edc2b4 (patch) | |
tree | 49d3339f93c9d9fad5c66609a1dc4964f2856f79 /tests | |
parent | 0c6ab52243353e3417e5a9733bb089e4771cc86e (diff) | |
parent | a31b9dac1cbda07225fcdffe03d13d68c4eab981 (diff) | |
download | guix-b60d2bfff95c0859d7814c1fe9d0940c87edc2b4.tar guix-b60d2bfff95c0859d7814c1fe9d0940c87edc2b4.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guix-build.sh | 13 | ||||
-rw-r--r-- | tests/guix-pack.sh | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 52feda9d3a..21b6af4395 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -36,6 +36,19 @@ guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' | \ guix build hello -d | \ grep -e '-hello-[0-9\.]\+\.drv$' +# Passing a .drv. +drv="`guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' -d`" +out="`guix build "$drv"`" +out2="`guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)'`" +test "$out" = "$out2" + +# Passing the name of a .drv that doesn't exist. The daemon should try to +# substitute the .drv. Here we just look for the "cannot build missing +# derivation" error that indicates that the daemon did try to substitute the +# .drv. +guix build "$NIX_STORE_DIR/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo.drv" 2>&1 \ + | grep "missing derivation" + # Passing a URI. GUIX_DAEMON_SOCKET="file://$GUIX_STATE_DIRECTORY/daemon-socket/socket" \ guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' diff --git a/tests/guix-pack.sh b/tests/guix-pack.sh index 0feae6d1e8..cf4e4ca4f9 100644 --- a/tests/guix-pack.sh +++ b/tests/guix-pack.sh @@ -36,6 +36,10 @@ export GUIX_BUILD_OPTIONS test_directory="`mktemp -d`" trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT +# Compute the derivation of a pack. +drv="`guix pack coreutils -d --no-grafts`" +guix gc -R "$drv" | grep "`guix build coreutils -d --no-grafts`" + # Build a tarball with no compression. guix pack --compression=none --bootstrap guile-bootstrap |