tests: Test "guix build /gnu/store/….drv".

* tests/guix-build.sh: Add test for passing "guix build" a .drv.
This commit is contained in:
Ludovic Courtès 2019-11-17 23:06:49 +01:00
parent 65209ffabd
commit 16ac74033a
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -36,6 +36,12 @@ guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' | \
guix build hello -d | \ guix build hello -d | \
grep -e '-hello-[0-9\.]\+\.drv$' 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 a URI. # Passing a URI.
GUIX_DAEMON_SOCKET="file://$GUIX_STATE_DIRECTORY/daemon-socket/socket" \ GUIX_DAEMON_SOCKET="file://$GUIX_STATE_DIRECTORY/daemon-socket/socket" \
guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)'