diff options
Diffstat (limited to 'tests/guix-build.sh')
-rw-r--r-- | tests/guix-build.sh | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 347cdfa4e4..6d4f97019a 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -43,6 +43,7 @@ trap "rm -rf $module_dir" EXIT cat > "$module_dir/foo.scm"<<EOF (define-module (foo) + #:use-module (guix tests) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system trivial)) @@ -88,6 +89,10 @@ cat > "$module_dir/foo.scm"<<EOF (synopsis "Dummy package") (description "bar is a dummy package for testing.") (license #f))) + +(define-public baz + (dummy-package "baz" (replacement foo))) + EOF GUIX_PACKAGE_PATH="$module_dir" @@ -97,6 +102,10 @@ export GUIX_PACKAGE_PATH guix build -d -S foo guix build -d -S foo | grep -e 'foo\.tar\.gz' +# 'baz' has a replacement so we should be getting the replacement's source. +(unset GUIX_BUILD_OPTIONS; + test "`guix build -d -S baz`" = "`guix build -d -S foo`") + guix build -d --sources=package foo guix build -d --sources=package foo | grep -e 'foo\.tar\.gz' @@ -161,8 +170,9 @@ then false; else true; fi # Parsing package names and versions. guix build -n time # PASS -guix build -n time-1.7 # PASS, version found -if guix build -n time-3.2; # FAIL, version not found +guix build -n time@1.7 # PASS, version found +guix build -n time-1.7 # PASS, deprecated version syntax +if guix build -n time@3.2; # FAIL, version not found then false; else true; fi if guix build -n something-that-will-never-exist; # FAIL then false; else true; fi @@ -207,7 +217,7 @@ guix build --file="$module_dir/gexp.scm" -d guix build --file="$module_dir/gexp.scm" -d | grep 'gexp\.drv' # Using 'GUIX_BUILD_OPTIONS'. -GUIX_BUILD_OPTIONS="--dry-run" +GUIX_BUILD_OPTIONS="--dry-run --no-grafts" export GUIX_BUILD_OPTIONS guix build emacs |