diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-03-25 10:52:52 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-03-25 10:52:52 +0100 |
commit | 25d5b708a636ecf779035f75ad110574fc0262b9 (patch) | |
tree | 7d8429a59b7523d79790c5f4cdb5b96fabe8494e /tests/derivations.scm | |
parent | 17287d7d47567aa1649250182e0f7ab11d5d55d1 (diff) | |
parent | 614c2188420a266ec512c9c04af3bb2ea46c4dc4 (diff) | |
download | guix-patches-25d5b708a636ecf779035f75ad110574fc0262b9.tar guix-patches-25d5b708a636ecf779035f75ad110574fc0262b9.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/derivations.scm')
-rw-r--r-- | tests/derivations.scm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/derivations.scm b/tests/derivations.scm index 72d253c465..a8cccac34a 100644 --- a/tests/derivations.scm +++ b/tests/derivations.scm @@ -499,6 +499,20 @@ (string=? path (derivation-file-name (%guile-for-build))))) (derivation-prerequisites drv)))) +(test-assert "derivation-prerequisites and derivation-input-is-valid?" + (let* ((a (build-expression->derivation %store "a" '(mkdir %output))) + (b (build-expression->derivation %store "b" `(list ,(random-text)))) + (c (build-expression->derivation %store "c" `(mkdir %output) + #:inputs `(("a" ,a) ("b" ,b))))) + (build-derivations %store (list a)) + (match (derivation-prerequisites c + (cut valid-derivation-input? %store + <>)) + ((($ <derivation-input> file ("out"))) + (string=? file (derivation-file-name b))) + (x + (pk 'fail x #f))))) + (test-assert "build-expression->derivation without inputs" (let* ((builder '(begin (mkdir %output) |