summary refs log tree commit diff
path: root/tests/guix-graph.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/guix-graph.sh')
-rw-r--r--tests/guix-graph.sh27
1 files changed, 25 insertions, 2 deletions
diff --git a/tests/guix-graph.sh b/tests/guix-graph.sh
index 2d4b3fac3f..4c37b61b38 100644
--- a/tests/guix-graph.sh
+++ b/tests/guix-graph.sh
@@ -1,5 +1,6 @@
 # GNU Guix --- Functional package management for GNU
 # Copyright © 2015, 2016, 2019 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2019 Simon Tournier <zimon.toutoune@gmail.com>
 #
 # This file is part of GNU Guix.
 #
@@ -20,10 +21,29 @@
 # Test the 'guix graph' command-line utility.
 #
 
-tmpfile1="t-guix-graph1-$$"
-tmpfile2="t-guix-graph2-$$"
+module_dir="t-guix-graph-$$"
+mkdir "$module_dir"
+trap "rm -rf $module_dir" EXIT
+
+tmpfile1="$module_dir/t-guix-graph1-$$"
+tmpfile2="$module_dir/t-guix-graph2-$$"
 trap 'rm -f "$tmpfile1" "$tmpfile2"' EXIT
 
+
+cat > "$module_dir/foo.scm"<<EOF
+(define-module (foo)
+  #:use-module (guix packages)
+  #:use-module (gnu packages base))
+
+(define-public dummy
+  (package (inherit hello)
+    (name "dummy")
+    (version "42")
+    (synopsis "dummy package")
+    (description "dummy package. Only used for testing purposes.")))
+EOF
+
+
 guix graph --version
 
 for package in guile-bootstrap coreutils python
@@ -59,3 +79,6 @@ guix graph git | grep 'label = "openssl'
 guix graph git --with-input=openssl=libressl | grep 'label = "libressl'
 if guix graph git --with-input=openssl=libressl | grep 'label = "openssl'
 then false; else true; fi
+
+# Try --load-path
+guix graph -L $module_dir dummy | grep 'label = "dummy'