X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/868c923f13e6ed95e1e5ad2bd32d4166842254ea..fad155d47ea22c7ffd042ffddd03b0a6babd3b65:/tests/guix-build.sh diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 721a7c6769..778911b2f8 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2012, 2013 Ludovic Courtès +# Copyright © 2012, 2013, 2014, 2016 Ludovic Courtès # # This file is part of GNU Guix. # @@ -31,26 +31,134 @@ if guix build -e '(@ (gnu packages bootstrap) %bootstrap-glibc)' -S then false; else true; fi # Should pass. -guix build -e '(@@ (gnu packages base) %bootstrap-guile)' | \ +guix build -e '(@@ (gnu packages bootstrap) %bootstrap-guile)' | \ grep -e '-guile-' guix build hello -d | \ grep -e '-hello-[0-9\.]\+\.drv$' +# Check --sources option with its arguments +module_dir="t-guix-build-$$" +mkdir "$module_dir" +trap "rm -rf $module_dir" EXIT + +cat > "$module_dir/foo.scm"<derivation \"test\" + (gexp (mkdir (ungexp output))))))" \ + --dry-run + +# Running a gexp. +guix build -e '#~(mkdir #$output)' -d +guix build -e '#~(mkdir #$output)' -d | grep 'gexp\.drv' + +# Building from a package file. +cat > "$module_dir/package.scm"< "$module_dir/proc.scm"<derivation "test" + (gexp (mkdir (ungexp output))))) +EOF +guix build --file="$module_dir/proc.scm" --dry-run + +# Building from a gexp file. +cat > "$module_dir/gexp.scm"<