summaryrefslogtreecommitdiff
path: root/tests/inferior.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-09-18 09:56:34 +0200
committerLudovic Courtès <ludo@gnu.org>2018-09-21 17:04:37 +0200
commit2e6d64e122ad2745154a38122785895d1b66c2ff (patch)
tree3382cc262500b4bf939d3a8339a0f172e6f62af1 /tests/inferior.scm
parenteee8b303f6d82c1400fd8fd3b097406358ed7875 (diff)
inferior: Add 'inferior-package->manifest-entry'.
* guix/inferior.scm (inferior-package->manifest-entry): New procedure. * tests/inferior.scm (manifest-entry->list): New procedure. ("inferior-package->manifest-entry"): New test.
Diffstat (limited to 'tests/inferior.scm')
-rw-r--r--tests/inferior.scm18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/inferior.scm b/tests/inferior.scm
index 99d736bd40..6f6abd28a1 100644
--- a/tests/inferior.scm
+++ b/tests/inferior.scm
@@ -21,6 +21,7 @@
#:use-module (guix inferior)
#:use-module (guix packages)
#:use-module (guix store)
+ #:use-module (guix profiles)
#:use-module (guix derivations)
#:use-module (gnu packages)
#:use-module (gnu packages bootstrap)
@@ -38,6 +39,13 @@
(define %store
(open-connection-for-tests))
+(define (manifest-entry->list entry)
+ (list (manifest-entry-name entry)
+ (manifest-entry-version entry)
+ (manifest-entry-output entry)
+ (manifest-entry-search-paths entry)
+ (map manifest-entry->list (manifest-entry-dependencies entry))))
+
(test-begin "inferior")
@@ -164,4 +172,14 @@
(list (inferior-package-derivation %store guile "x86_64-linux")
(inferior-package-derivation %store guile "armhf-linux")))))
+(test-equal "inferior-package->manifest-entry"
+ (manifest-entry->list (package->manifest-entry
+ (first (find-best-packages-by-name "guile" #f))))
+ (let* ((inferior (open-inferior %top-builddir
+ #:command "scripts/guix"))
+ (guile (first (lookup-inferior-packages inferior "guile")))
+ (entry (inferior-package->manifest-entry guile)))
+ (close-inferior inferior)
+ (manifest-entry->list entry)))
+
(test-end "inferior")