jenkins/kola/qemu(_uefi): run update test from previous release

The newly enabled update test performs an update from the built image
to itself. This is useful to test that the update mechanism didn't
break but it doesn't say if the built image will be accepted as update
from the previous official release.

Introduce an additional kola run that begins from the previous official
release and tests to update to the built image. Since the test does two
updates it also covers the case of updating from the built image to the
built image. Thus, we can skip the test in the normal run.
This new kola run is done first to keep the qemu-latest symlink valid
for the main test suite.
This commit is contained in:
Kai Lüke 2021-07-26 15:23:53 +02:00
parent 1b70f59cd0
commit e96c1c5e6d

View File

@ -68,6 +68,25 @@ bin/gangue get \
"${DOWNLOAD_ROOT}/boards/${BOARD}/${FLATCAR_VERSION}/flatcar_test_update.gz"
mv flatcar_test_update.gz tmp/
if [ "${KOLA_TESTS}" = "*" ] || [ "$(echo "${KOLA_TESTS}" | grep 'cl.update.payload')" != "" ]; then
# First test to update from the previous release, this is done before running the real kola suite so that the qemu-latest symlink still points to the full run
rm -f flatcar_production_image.bin.bz2
curl -fsSLO --retry-delay 1 --retry 60 --retry-connrefused --retry-max-time 60 --connect-timeout 20 "https://${GROUP}.release.flatcar-linux.net/${BOARD}/current/flatcar_production_image.bin.bz2"
mv flatcar_production_image.bin.bz2 tmp/flatcar_production_image_previous.bin.bz2
enter lbunzip2 -k -f /mnt/host/source/tmp/flatcar_production_image_previous.bin.bz2
enter sudo timeout --signal=SIGQUIT "${TIMEOUT}" kola run \
--board="${BOARD}" \
--channel="${GROUP}" \
--parallel="${PARALLEL}" \
--platform=qemu \
--qemu-bios="${BIOS}" \
--qemu-image=/mnt/host/source/tmp/flatcar_production_image_previous.bin \
--tapfile="/mnt/host/source/${JOB_NAME##*/}_update_from_previous_release.tap" \
--torcx-manifest=/mnt/host/source/torcx_manifest.json \
--update-payload=/mnt/host/source/tmp/flatcar_test_update.gz \
cl.update.payload
fi
# Do not expand the kola test patterns globs
set -o noglob
enter sudo timeout --signal=SIGQUIT "${TIMEOUT}" kola run \
@ -79,7 +98,6 @@ enter sudo timeout --signal=SIGQUIT "${TIMEOUT}" kola run \
--qemu-image=/mnt/host/source/tmp/flatcar_production_image.bin \
--tapfile="/mnt/host/source/${JOB_NAME##*/}.tap" \
--torcx-manifest=/mnt/host/source/torcx_manifest.json \
--update-payload=/mnt/host/source/tmp/flatcar_test_update.gz \
${KOLA_TESTS}
set +o noglob