summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-01-17 22:41:47 +0100
committerLudovic Courtès <ludo@gnu.org>2013-01-17 22:42:39 +0100
commit9241172c9dc41ac026f05837dc6f089b1a3745e0 (patch)
treeede4741b6a1ae27286b450c716212557d3937005 /tests
parent24e262f086980a13d9d0a27615ed7eaec4aacbff (diff)
downloadguix-9241172c9dc41ac026f05837dc6f089b1a3745e0.tar.gz
guix-package: Allow `--roll-back' to skip missing generations.
* guix-package.in (profile-numbers): New procedure.
  (latest-profile-number): Use it.
  (previous-profile-number): New procedure.
  (roll-back): Use it lieu of `1-'.  Check whether PREVIOUS-NUMBER is
  zero, and raise an error when it is.
* tests/guix-package.sh: Test whether we can roll back over a "hole".
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-package.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index fd778f4f4f..fc80939646 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -95,6 +95,12 @@ then
     guix-package --bootstrap -p "$profile" --roll-back -i "$boot_guile"
     test "`readlink_base "$profile"`" = "$profile-5-link"
     test -x "$profile/bin/guile" && test -x "$profile/bin/make"
+
+    # Make a "hole" in the list of generations, and make sure we can
+    # roll back "over" it.
+    rm "$profile-4-link"
+    guix-package --bootstrap -p "$profile" --roll-back
+    test "`readlink_base "$profile"`" = "$profile-3-link"
 fi
 
 # Make sure the `:' syntax works.