summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-05-10 00:53:29 +0200
committerLudovic Courtès <ludo@gnu.org>2020-05-11 23:30:55 +0200
commit88a96c568c47c97d05d883ada5afbc4e1200b10f (patch)
tree77b36cc42aba2ce6ab9d556f8620f6a9ad7e6388 /tests
parent36c2192414dfcc43db767106cede2cc1d0e6e556 (diff)
downloadpatches-88a96c568c47c97d05d883ada5afbc4e1200b10f.tar
patches-88a96c568c47c97d05d883ada5afbc4e1200b10f.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-graph.sh16
1 files changed, 15 insertions, 1 deletions
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 <ludo@gnu.org>
+# Copyright © 2015, 2016, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
# Copyright © 2019 Simon Tournier <zimon.toutoune@gmail.com>
#
# 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