mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
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.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user