From 9daf046c5dd9256e45073dfd4647e12de10dcb3e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 14 Sep 2018 17:30:06 +0200 Subject: inferior: Add 'inferior-package-derivation'. * guix/inferior.scm (read-inferior-response) (send-inferior-request): New procedures. (inferior-eval): Rewrite in terms of these. (proxy, inferior-package-derivation, inferior-package->derivation) (package-compiler): New procedures. * tests/inferior.scm ("inferior-package-derivation"): New test. --- tests/inferior.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests') diff --git a/tests/inferior.scm b/tests/inferior.scm index ff5cad4210..817fcb6c6b 100644 --- a/tests/inferior.scm +++ b/tests/inferior.scm @@ -17,9 +17,13 @@ ;;; along with GNU Guix. If not, see . (define-module (test-inferior) + #:use-module (guix tests) #:use-module (guix inferior) #:use-module (guix packages) + #:use-module (guix store) + #:use-module (guix derivations) #:use-module (gnu packages) + #:use-module (gnu packages bootstrap) #:use-module (srfi srfi-1) #:use-module (srfi srfi-64)) @@ -29,6 +33,9 @@ (define %top-builddir (dirname (search-path %load-compiled-path "guix.go"))) +(define %store + (open-connection-for-tests)) + (test-begin "inferior") @@ -72,4 +79,19 @@ (close-inferior inferior) result)))) +(test-equal "inferior-package-derivation" + (map derivation-file-name + (list (package-derivation %store %bootstrap-guile "x86_64-linux") + (package-derivation %store %bootstrap-guile "armhf-linux"))) + (let* ((inferior (open-inferior %top-builddir + #:command "scripts/guix")) + (packages (inferior-packages inferior)) + (guile (find (lambda (package) + (string=? (package-name %bootstrap-guile) + (inferior-package-name package))) + packages))) + (map derivation-file-name + (list (inferior-package-derivation %store guile "x86_64-linux") + (inferior-package-derivation %store guile "armhf-linux"))))) + (test-end "inferior") -- cgit v1.2.3