From 88a96c568c47c97d05d883ada5afbc4e1200b10f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 10 May 2020 00:53:29 +0200 Subject: guix graph: Add '--path'. * guix/scripts/graph.scm (display-path): New procedure. (%options, show-help): Add '--path'. (guix-graph): Handle it. * tests/guix-graph.sh: Add tests. * doc/guix.texi (Invoking guix graph): Document it. (Invoking guix size): Mention it. --- tests/guix-graph.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'tests/guix-graph.sh') diff --git a/tests/guix-graph.sh b/tests/guix-graph.sh index 4c37b61b38..ccb4933c88 100644 --- a/tests/guix-graph.sh +++ b/tests/guix-graph.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2015, 2016, 2019 Ludovic Courtès +# Copyright © 2015, 2016, 2019, 2020 Ludovic Courtès # Copyright © 2019 Simon Tournier # # This file is part of GNU Guix. @@ -82,3 +82,17 @@ then false; else true; fi # Try --load-path guix graph -L $module_dir dummy | grep 'label = "dummy' + +# Displaying shortest paths (or lack thereof). +if guix graph --path emacs vim; then false; else true; fi + +path="\ +emacs +gnutls +guile +libffi" +test "`guix graph --path emacs libffi | cut -d '@' -f1`" = "$path" + +# At the derivation level, there's a direct path because libffi is propagated +# via gtk+. +test "`guix graph --path -t derivation emacs libffi | wc -l`" -ge 2 -- cgit v1.2.3