aboutsummaryrefslogtreecommitdiff
path: root/tests/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-11-03 21:26:48 +0100
committerLudovic Courtès <ludo@gnu.org>2014-11-03 21:26:48 +0100
commitc37a74bd3e9ef70eb1431ec932ca01785e1d57bc (patch)
tree5e10b3cc9cbd51335a16f2207b799a2e1567152a /tests/packages.scm
parent6888830b353cfa2e12ecd11f924fa32b58cddedc (diff)
downloadguix-c37a74bd3e9ef70eb1431ec932ca01785e1d57bc.tar
guix-c37a74bd3e9ef70eb1431ec932ca01785e1d57bc.tar.gz
packages: 'package-transitive-supported-systems' accounts for indirect deps.
Reported by Andreas Enge <andreas@enge.fr>. * guix/packages.scm (first-value): New macro. (package-transitive-supported-systems): Rewrite to traverse all the DAG rooted at PACKAGE. * tests/packages.scm ("package-transitive-supported-systems"): Add 'd' and 'e', and test them.
Diffstat (limited to 'tests/packages.scm')
-rw-r--r--tests/packages.scm18
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index 4f700b712f..98fa9b5698 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -125,17 +125,25 @@
(pk 'x (package-transitive-inputs e))))))
(test-equal "package-transitive-supported-systems"
- '(("x" "y" "z")
- ("x" "y")
- ("y"))
+ '(("x" "y" "z") ;a
+ ("x" "y") ;b
+ ("y") ;c
+ ("y") ;d
+ ("y")) ;e
(let* ((a (dummy-package "a" (supported-systems '("x" "y" "z"))))
(b (dummy-package "b" (supported-systems '("x" "y"))
(inputs `(("a" ,a)))))
(c (dummy-package "c" (supported-systems '("y" "z"))
- (inputs `(("b" ,b))))))
+ (inputs `(("b" ,b)))))
+ (d (dummy-package "d" (supported-systems '("x" "y" "z"))
+ (inputs `(("b" ,b) ("c" ,c)))))
+ (e (dummy-package "e" (supported-systems '("x" "y" "z"))
+ (inputs `(("d" ,d))))))
(list (package-transitive-supported-systems a)
(package-transitive-supported-systems b)
- (package-transitive-supported-systems c))))
+ (package-transitive-supported-systems c)
+ (package-transitive-supported-systems d)
+ (package-transitive-supported-systems e))))
(test-skip (if (not %store) 8 0))