aboutsummaryrefslogtreecommitdiff
path: root/tests/inferior.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2018-09-18 10:21:28 +0200
committerLudovic Courtès <ludo@gnu.org>2018-09-21 17:04:37 +0200
commit811b21fb15d36b06fde994ca7ef5916a9a19f250 (patch)
tree4dd6c27925dab39c7b6373cf97cca258813e56e2 /tests/inferior.scm
parent2e6d64e122ad2745154a38122785895d1b66c2ff (diff)
downloadguix-811b21fb15d36b06fde994ca7ef5916a9a19f250.tar
guix-811b21fb15d36b06fde994ca7ef5916a9a19f250.tar.gz
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.
Diffstat (limited to 'tests/inferior.scm')
-rw-r--r--tests/inferior.scm11
1 files changed, 11 insertions, 0 deletions
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")