mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-23 21:17:11 -05:00
Add `derivation' test for multiple-output derivations.
* tests/derivations.scm ("multiple-output derivation"): New test.
This commit is contained in:
parent
af7f9e5f13
commit
7946c4e710
1 changed files with 18 additions and 0 deletions
|
@ -85,6 +85,24 @@ (define %store
|
|||
(equal? (string->utf8 "hello")
|
||||
(call-with-input-file p get-bytevector-all))))))
|
||||
|
||||
(test-assert "multiple-output derivation"
|
||||
(let* ((builder (add-text-to-store %store "my-fixed-builder.sh"
|
||||
"echo one > $out ; echo two > $second"
|
||||
'()))
|
||||
(drv-path (derivation %store "fixed" "x86_64-linux"
|
||||
"/bin/sh" `(,builder)
|
||||
'(("HOME" . "/homeless")
|
||||
("zzz" . "Z!")
|
||||
("AAA" . "A!"))
|
||||
`((,builder))
|
||||
#:outputs '("out" "second")))
|
||||
(succeeded? (build-derivations %store (list drv-path))))
|
||||
(and succeeded?
|
||||
(let ((one (derivation-path->output-path drv-path "out"))
|
||||
(two (derivation-path->output-path drv-path "second")))
|
||||
(and (eq? 'one (call-with-input-file one read))
|
||||
(eq? 'two (call-with-input-file two read)))))))
|
||||
|
||||
|
||||
(define %coreutils
|
||||
(false-if-exception (nixpkgs-derivation "coreutils")))
|
||||
|
|
Loading…
Reference in a new issue