diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-09-26 00:20:11 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-09-26 00:20:11 +0200 |
commit | 7facbf2b58f80afffedbb9230ec7ab9b61232dfe (patch) | |
tree | 7ab3870f77f596e548ccd0e50f5ea16d1c32f434 /tests/guix-package.sh | |
parent | 1fa49a2c4636c0f35972c16f6bd2d28a4424b821 (diff) | |
parent | 834b5c80763eba42018606a674bcc53bfeca10eb (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/guix-package.sh')
-rw-r--r-- | tests/guix-package.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh index b09a9c0173..5f97aff026 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -79,12 +79,16 @@ then # Search. test "`guix package -s "An example GNU package" | grep ^name:`" = \ "name: hello" - test "`guix package -s "n0t4r341p4ck4g3"`" = "" + test -z "`guix package -s "n0t4r341p4ck4g3"`" # List generations. 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" @@ -107,11 +111,17 @@ then test "`readlink_base "$profile"`" = "$profile-0-link" done + # Test that '--list-generations' does not output the zeroth generation. + test -z "`guix package -p "$profile" -l 0`" + # Reinstall after roll-back to the empty profile. guix package --bootstrap -p "$profile" -e "$boot_make" test "`readlink_base "$profile"`" = "$profile-1-link" test -x "$profile/bin/guile" && ! test -x "$profile/bin/make" + # Check that the first generation is the current one. + test "`guix package -p "$profile" -l 1 | cut -f3 | head -n1`" = "(current)" + # Roll-back to generation 0, and install---all at once. guix package --bootstrap -p "$profile" --roll-back -i guile-bootstrap test "`readlink_base "$profile"`" = "$profile-1-link" |