summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-05-25 19:33:19 +0200
committerLudovic Courtès <ludo@gnu.org>2015-05-25 21:34:23 +0200
commit5f1087c48144e15d9e37d23b559017f9d7e326cd (patch)
tree15ebd0f8b3389de2dc22cd0c09870a23c73ef9ed /tests
parent2abcc97fd1867176d5530f988ab34c26530de2c2 (diff)
downloadguix-5f1087c48144e15d9e37d23b559017f9d7e326cd.tar.gz
guix package: --manifest DTRT when combined with --dry-run.
* guix/scripts/package.scm (guix-package)[process-actions]: Process 'manifest
  action regardless of whether 'dry-run? is set.  Adjust the message
  accordingly.
* tests/guix-package.sh: Add error-reporting test.
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-package.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index 26a5e9d1a2..b361b1ba00 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -245,7 +245,7 @@ guix package -I
 
 unset GUIX_BUILD_OPTIONS
 
-# Applying a manifest file
+# Applying a manifest file.
 cat > "$module_dir/manifest.scm"<<EOF
 (use-package-modules bootstrap)
 
@@ -254,3 +254,19 @@ EOF
 guix package --bootstrap -m "$module_dir/manifest.scm"
 guix package -I | grep guile
 test `guix package -I | wc -l` -eq 1
+
+# Error reporting.
+cat > "$module_dir/manifest.scm"<<EOF
+(use-package-modules bootstrap)
+(packages->manifest
+  (list %bootstrap-guile
+        wonderful-package-that-does-not-exist))
+EOF
+if guix package --bootstrap -n -m "$module_dir/manifest.scm" \
+	2> "$module_dir/stderr"
+then false
+else
+    cat "$module_dir/stderr"
+    grep "manifest.scm:[1-3]:.*[Uu]nbound variable.*wonderful-package" \
+	 "$module_dir/stderr"
+fi