aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-package.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index 94cf927420..a4c04255ba 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -161,6 +161,9 @@ then
guix package --bootstrap -p "$profile" -i guile-bootstrap -i gcc-bootstrap
guix package --search-paths -p "$profile" | grep LIBRARY_PATH
+ # Roll back so we can delete #3 below.
+ guix package -p "$profile" --switch-generation=2
+
# Delete the third generation and check that it was actually deleted.
guix package -p "$profile" --delete-generations=3
test -z "`guix package -p "$profile" -l 3`"
@@ -212,6 +215,14 @@ if guix package -p "$profile" --delete-generations=12m;
then false; else true; fi
test "`readlink_base "$profile"`" = "$generation"
+# The following command should not delete the current generation, even though
+# it matches the given pattern (see <http://bugs.gnu.org/19978>.) And since
+# there's nothing else to delete, it should just fail.
+guix package --list-generations -p "$profile"
+if guix package --bootstrap -p "$profile" --delete-generations=1..
+then false; else true; fi
+test "`readlink_base "$profile"`" = "$generation"
+
# Make sure $profile is a GC root at this point.
real_profile="`readlink -f "$profile"`"
if guix gc -d "$real_profile"