diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2018-09-14 17:30:06 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2018-09-21 17:04:37 +0200 |
| commit | 9daf046c5dd9256e45073dfd4647e12de10dcb3e (patch) | |
| tree | 39a226beff081b10217ae1859ba3be43c32eb7a7 /tests | |
| parent | 7e27393f82ff5e7237f870ded09652b89e457faa (diff) | |
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.scm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/inferior.scm b/tests/inferior.scm index ff5cad4210a..817fcb6c6b5 100644 --- a/tests/inferior.scm +++ b/tests/inferior.scm | |||
| @@ -17,9 +17,13 @@ | |||
| 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 18 | 18 | ||
| 19 | (define-module (test-inferior) | 19 | (define-module (test-inferior) |
| 20 | #:use-module (guix tests) | ||
| 20 | #:use-module (guix inferior) | 21 | #:use-module (guix inferior) |
| 21 | #:use-module (guix packages) | 22 | #:use-module (guix packages) |
| 23 | #:use-module (guix store) | ||
| 24 | #:use-module (guix derivations) | ||
| 22 | #:use-module (gnu packages) | 25 | #:use-module (gnu packages) |
| 26 | #:use-module (gnu packages bootstrap) | ||
| 23 | #:use-module (srfi srfi-1) | 27 | #:use-module (srfi srfi-1) |
| 24 | #:use-module (srfi srfi-64)) | 28 | #:use-module (srfi srfi-64)) |
| 25 | 29 | ||
| @@ -29,6 +33,9 @@ | |||
| 29 | (define %top-builddir | 33 | (define %top-builddir |
| 30 | (dirname (search-path %load-compiled-path "guix.go"))) | 34 | (dirname (search-path %load-compiled-path "guix.go"))) |
| 31 | 35 | ||
| 36 | (define %store | ||
| 37 | (open-connection-for-tests)) | ||
| 38 | |||
| 32 | 39 | ||
| 33 | (test-begin "inferior") | 40 | (test-begin "inferior") |
| 34 | 41 | ||
| @@ -72,4 +79,19 @@ | |||
| 72 | (close-inferior inferior) | 79 | (close-inferior inferior) |
| 73 | result)))) | 80 | result)))) |
| 74 | 81 | ||
| 82 | (test-equal "inferior-package-derivation" | ||
| 83 | (map derivation-file-name | ||
| 84 | (list (package-derivation %store %bootstrap-guile "x86_64-linux") | ||
| 85 | (package-derivation %store %bootstrap-guile "armhf-linux"))) | ||
| 86 | (let* ((inferior (open-inferior %top-builddir | ||
| 87 | #:command "scripts/guix")) | ||
| 88 | (packages (inferior-packages inferior)) | ||
| 89 | (guile (find (lambda (package) | ||
| 90 | (string=? (package-name %bootstrap-guile) | ||
| 91 | (inferior-package-name package))) | ||
| 92 | packages))) | ||
| 93 | (map derivation-file-name | ||
| 94 | (list (inferior-package-derivation %store guile "x86_64-linux") | ||
| 95 | (inferior-package-derivation %store guile "armhf-linux"))))) | ||
| 96 | |||
| 75 | (test-end "inferior") | 97 | (test-end "inferior") |
