From 811b21fb15d36b06fde994ca7ef5916a9a19f250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 18 Sep 2018 10:21:28 +0200 Subject: profiles: 'packages->manifest' now accepts inferior packages. * guix/profiles.scm (packages->manifest)[inferiors-loaded?]: New variable. [inferior->entry]: New procedure. Accept inferior packages when INFERIORS-LOADED? is true. * tests/guix-package.sh: Add test using a manifest with an inferior. * tests/inferior.scm ("packages->manifest"): New test. --- tests/guix-package.sh | 15 +++++++++++++++ tests/inferior.scm | 11 +++++++++++ 2 files changed, 26 insertions(+) (limited to 'tests') 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"<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"<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") -- cgit v1.2.3