summary refs log tree commit diff
path: root/tests/derivations.scm
diff options
context:
space:
mode:
author宋文武 <iyzsong@gmail.com>2015-05-23 09:43:12 +0800
committer宋文武 <iyzsong@gmail.com>2015-05-23 09:43:12 +0800
commit86a81222cad9841c67e9d9bcd46c567383e9a34f (patch)
treed976896cba87c5de65d8fdc4bf0be85880c04153 /tests/derivations.scm
parent3e3d47fc5347a5032fd2039831be1dc1d80576ed (diff)
parent8605321dd6f3c42590046be9d69112a8c8cf7cbf (diff)
downloadguix-86a81222cad9841c67e9d9bcd46c567383e9a34f.tar.gz
Merge branch 'master' into gtk-rebuild
Conflicts:
	gnu/packages/gtk.scm
Diffstat (limited to 'tests/derivations.scm')
-rw-r--r--tests/derivations.scm14
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)