Skip to content

Commit

Permalink
tests: skip boot loader check during testing preparation on s390x (#1…
Browse files Browse the repository at this point in the history
…1423)

* Skip bootloader check during testing preparation on classic

As snapd does not care about the bootloader in classic systems, the idea
is to avoid this check to make the tests work on s390x architecture
where the bootloader is zipl.

* Skip bootloader check on s390x
  • Loading branch information
sergiocazzolato authored Feb 23, 2022
1 parent cb2f5df commit 16a71cd
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/lib/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,16 @@ prepare_classic() {

disable_refreshes

echo "Ensure that the bootloader environment output does not contain any of the snap_* variables on classic"
# shellcheck disable=SC2119
output=$("$TESTSTOOLS"/boot-state bootenv show)
if echo "$output" | MATCH snap_ ; then
echo "Expected bootloader environment without snap_*, got:"
echo "$output"
exit 1
# Check bootloader environment output in architectures different to s390x which uses zIPL
if ! [ "$(uname -m)" = "s390x" ]; then
echo "Ensure that the bootloader environment output does not contain any of the snap_* variables on classic"
# shellcheck disable=SC2119
output=$("$TESTSTOOLS"/boot-state bootenv show)
if echo "$output" | MATCH snap_ ; then
echo "Expected bootloader environment without snap_*, got:"
echo "$output"
exit 1
fi
fi

setup_experimental_features
Expand Down

0 comments on commit 16a71cd

Please sign in to comment.