aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-package.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/guix-package.sh')
-rw-r--r--tests/guix-package.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index e35871f2a2..3e0e36fa23 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -87,6 +87,8 @@ then
# Exit with 1 when a generation does not exist.
if guix package -p "$profile" --list-generations=42;
then false; else true; fi
+ if guix package -p "$profile" --switch-generation=99;
+ then false; else true; fi
# Remove a package.
guix package --bootstrap -p "$profile" -r "guile-bootstrap"
@@ -101,6 +103,12 @@ then
test "`readlink_base "$profile"`" = "$profile-1-link"
test -x "$profile/bin/guile" && ! test -x "$profile/bin/make"
+ # Switch to the rolled generation and switch back.
+ guix package -p "$profile" --switch-generation=2
+ test "`readlink_base "$profile"`" = "$profile-2-link"
+ guix package -p "$profile" --switch-generation=-1
+ test "`readlink_base "$profile"`" = "$profile-1-link"
+
# Move to the empty profile.
for i in `seq 1 3`
do
@@ -133,10 +141,12 @@ then
grep "`guix build -e "$boot_make"`" "$profile/manifest"
# Make a "hole" in the list of generations, and make sure we can
- # roll back "over" it.
+ # roll back and switch "over" it.
rm "$profile-1-link"
guix package --bootstrap -p "$profile" --roll-back
test "`readlink_base "$profile"`" = "$profile-0-link"
+ guix package -p "$profile" --switch-generation=+1
+ test "`readlink_base "$profile"`" = "$profile-2-link"
# Make sure LIBRARY_PATH gets listed by `--search-paths'.
guix package --bootstrap -p "$profile" -i guile-bootstrap -i gcc-bootstrap