aboutsummaryrefslogtreecommitdiff
path: root/tests/graph.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-01-02 22:22:57 +0100
committerLudovic Courtès <ludo@gnu.org>2016-01-02 22:25:41 +0100
commit51385362f76e2f823ac8d8cf720d06c386504069 (patch)
tree7d665f8b57fce9c165f03581dc3450203d1ab3d3 /tests/graph.scm
parentf88282af38dfe805034686e88bab734c582ef74d (diff)
downloadguix-51385362f76e2f823ac8d8cf720d06c386504069.tar
guix-51385362f76e2f823ac8d8cf720d06c386504069.tar.gz
graph: %BAG-WITH-ORIGINS-NODE-TYPE includes the origin's guile.
Before that it would include #f for most origins since that the default value of 'origin-patch-guile'. * guix/scripts/graph.scm (bag-node-edges): When 'origin-patch-guile' returns #f, use (default-guile). * tests/graph.scm ("bag DAG, including origins"): Check for an edge from O to (default-guile).
Diffstat (limited to 'tests/graph.scm')
-rw-r--r--tests/graph.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/graph.scm b/tests/graph.scm
index daf64dc56d..4f85432d2f 100644
--- a/tests/graph.scm
+++ b/tests/graph.scm
@@ -150,7 +150,8 @@ edges."
(let-values (((nodes edges) (nodes+edges)))
(run-with-store %store
(mlet %store-monad ((o* (lower-object o))
- (p* (lower-object p)))
+ (p* (lower-object p))
+ (g (lower-object (default-guile))))
(return
(and (find (match-lambda
((file "the-uri") #t)
@@ -160,6 +161,13 @@ edges."
((source target)
(and (string=? source (derivation-file-name p*))
(string=? target o*))))
+ edges)
+
+ ;; There must also be an edge from O to G.
+ (find (match-lambda
+ ((source target)
+ (and (string=? source o*)
+ (string=? target (derivation-file-name g)))))
edges)))))))))
(test-assert "derivation DAG"