diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-01-02 22:12:36 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-01-02 22:25:41 +0100 |
commit | f88282af38dfe805034686e88bab734c582ef74d (patch) | |
tree | b1063426d58389b73067fc0e7c81c5534335ec8a /tests | |
parent | 1ae858f33313ff6e74cfad2b7ecd1d271938e775 (diff) |
graph: %BAG-EMERGED-NODE-TYPE filters out origins.
Fixes <http://bugs.gnu.org/22280>.
Reported by Leo Famulari <leo@famulari.name>.
* guix/scripts/graph.scm (%bag-emerged-node-type)[edges]: Mimic
%BAG-NODE-TYPE. This is a followup to 38b92da.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/graph.scm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/graph.scm b/tests/graph.scm index 04c6e74279..daf64dc56d 100644 --- a/tests/graph.scm +++ b/tests/graph.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -89,16 +89,18 @@ edges." (test-assert "bag-emerged DAG" (let-values (((backend nodes+edges) (make-recording-backend))) - (let ((p (dummy-package "p")) - (implicit (map (match-lambda - ((label package) package)) - (standard-packages)))) + (let* ((o (dummy-origin (method (lambda _ + (text-file "foo" "bar"))))) + (p (dummy-package "p" (source o))) + (implicit (map (match-lambda + ((label package) package)) + (standard-packages)))) (run-with-store %store (export-graph (list p) 'port #:node-type %bag-emerged-node-type #:backend backend)) ;; We should see exactly P and IMPLICIT, with one edge from P to each - ;; element of IMPLICIT. + ;; element of IMPLICIT. O must not appear among NODES. (let-values (((nodes edges) (nodes+edges))) (and (equal? (match nodes (((labels names) ...) |