diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guix-package.sh | 15 | ||||
-rw-r--r-- | tests/inferior.scm | 11 |
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh index cef3b3452e..f7dfbfad00 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -358,6 +358,21 @@ EOF guix package --bootstrap -m "$module_dir/manifest.scm" guix package -I | grep guile test `guix package -I | wc -l` -eq 1 +guix package --rollback --bootstrap + +# Applying a manifest file with inferior packages. +cat > "$module_dir/manifest.scm"<<EOF +(use-modules (guix inferior)) + +(define i + (open-inferior "$abs_top_srcdir" #:command "scripts/guix")) + +(let ((guile (car (lookup-inferior-packages i "guile-bootstrap")))) + (packages->manifest (list guile))) +EOF +guix package --bootstrap -m "$module_dir/manifest.scm" +guix package -I | grep guile +test `guix package -I | wc -l` -eq 1 # Error reporting. cat > "$module_dir/manifest.scm"<<EOF diff --git a/tests/inferior.scm b/tests/inferior.scm index 6f6abd28a1..d1d5c00a77 100644 --- a/tests/inferior.scm +++ b/tests/inferior.scm @@ -182,4 +182,15 @@ (close-inferior inferior) (manifest-entry->list entry))) +(test-equal "packages->manifest" + (map manifest-entry->list + (manifest-entries (packages->manifest + (find-best-packages-by-name "guile" #f)))) + (let* ((inferior (open-inferior %top-builddir + #:command "scripts/guix")) + (guile (first (lookup-inferior-packages inferior "guile"))) + (manifest (packages->manifest (list guile)))) + (close-inferior inferior) + (map manifest-entry->list (manifest-entries manifest)))) + (test-end "inferior") |