aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-09-14 17:30:06 +0200
committerLudovic Courtès <ludo@gnu.org>2018-09-21 17:04:37 +0200
commit9daf046c5dd9256e45073dfd4647e12de10dcb3e (patch)
tree39a226beff081b10217ae1859ba3be43c32eb7a7 /tests
parent7e27393f82ff5e7237f870ded09652b89e457faa (diff)
downloadguix-9daf046c5dd9256e45073dfd4647e12de10dcb3e.tar
guix-9daf046c5dd9256e45073dfd4647e12de10dcb3e.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/inferior.scm22
1 files changed, 22 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>.
(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")