aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-package.sh
diff options
context:
space:
mode:
authorNikita Karetnikov <nikita@karetnikov.org>2013-09-24 22:11:16 +0000
committerNikita Karetnikov <nikita@karetnikov.org>2013-09-25 16:07:50 +0000
commit0ab212b9466d5aa3fe801c9137248703245d8513 (patch)
tree26ead056ff74e396e4cf7d7cfb22d29b6fd59c14 /tests/guix-package.sh
parent98fbd7ceebd7930f23a8985b9080d3a7cac7818a (diff)
downloadguix-0ab212b9466d5aa3fe801c9137248703245d8513.tar
guix-0ab212b9466d5aa3fe801c9137248703245d8513.tar.gz
guix package: Exit with 1 when a generation cannot be listed.
* guix/scripts/package.scm (guix-package)[process-query]: Exit with 1 when a generation does not exist or the profile points to the zeroth generation. * tests/guix-package.sh: Test the former case.
Diffstat (limited to 'tests/guix-package.sh')
-rw-r--r--tests/guix-package.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index b09a9c0173..f1f7ee6c7d 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -85,6 +85,10 @@ then
test "`guix package -p "$profile" -l | cut -f1 | grep guile | head -n1`" \
= " guile-bootstrap"
+ # Exit with 1 when a generation does not exist.
+ if guix package -p "$profile" --list-generations=42;
+ then false; else true; fi
+
# Remove a package.
guix package --bootstrap -p "$profile" -r "guile-bootstrap"
test -L "$profile-3-link"