diff options
author | Eric Bavier <bavier@posteo.net> | 2023-04-20 00:11:27 -0500 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-04-21 16:16:38 +0200 |
commit | 37dd69b44511dc73eb04bdebe8d82c9a0386338e (patch) | |
tree | d20ecc2b15659ed2345f00beb39170a5365a7051 /tests/guix-package-aliases.sh | |
parent | a09c7da8f8d8e732f969cf0a09aaa78f87032ab1 (diff) |
tests: Fix checks for expected failures.
Addresses <https://issues.guix.gnu.org/62406>.
With 'set -e', a return status inverted with '!' does not cause the shell to
exit immediately. Instead use '&& false' to indicate an expected failure.
* tests/guix-archive.sh, tests/guix-build-branch.sh, tests/guix-build.sh,
tests/guix-daemon.sh, tests/guix-download.sh,
tests/guix-environment-container.sh, tests/guix-environment.sh,
tests/guix-gc.sh, tests/guix-git-authenticate.sh, tests/guix-graph.sh,
tests/guix-hash.sh, tests/guix-home.sh, tests/guix-pack-relocatable.sh,
tests/guix-pack.sh, tests/guix-package-aliases.sh, tests/guix-package-net.sh,
tests/guix-package.sh, tests/guix-refresh.sh, tests/guix-shell.sh,
tests/guix-style.sh, tests/guix-system.sh: Replace uses of '! ...' with
'... && false' or `test ! ...` as appropriate.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests/guix-package-aliases.sh')
-rw-r--r-- | tests/guix-package-aliases.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/guix-package-aliases.sh b/tests/guix-package-aliases.sh index 311838b768..f68d24b9a7 100644 --- a/tests/guix-package-aliases.sh +++ b/tests/guix-package-aliases.sh @@ -36,7 +36,7 @@ guix install --bootstrap guile-bootstrap -p "$profile" test -x "$profile/bin/guile" # Make sure '-r' isn't passed as-is to 'guix package'. -! guix install -r guile-bootstrap -p "$profile" --bootstrap +guix install -r guile-bootstrap -p "$profile" --bootstrap && false test -x "$profile/bin/guile" # Use a package transformation option and make sure it's recorded. @@ -48,16 +48,16 @@ grep "libreoffice=inkscape" "$profile/manifest" guix upgrade --version guix upgrade -n guix upgrade gui.e -n -! guix upgrade foo bar -n; +guix upgrade foo bar -n && false guix remove --version guix remove --bootstrap guile-bootstrap -p "$profile" -! test -x "$profile/bin/guile" +test ! -x "$profile/bin/guile" test `guix package -p "$profile" -I | wc -l` -eq 0 -! guix remove -p "$profile" this-is-not-installed --bootstrap +guix remove -p "$profile" this-is-not-installed --bootstrap && false -! guix remove -i guile-bootstrap -p "$profile" --bootstrap +guix remove -i guile-bootstrap -p "$profile" --bootstrap && false guix search '\<board\>' game | grep '^name: gnubg' @@ -66,7 +66,7 @@ guix show guile guix show python@3 | grep "^name: python" # "python@2" exists but is deprecated; make sure it doesn't show up. -! guix show python@2 +guix show python@2 && false # Specifying multiple packages. output="`guix show sed grep | grep ^name:`" |