From e96c1c5e6d56ef10be19cd512e1c1fbc93bb6069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20L=C3=BCke?= Date: Mon, 26 Jul 2021 15:23:53 +0200 Subject: [PATCH] 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. --- jenkins/kola/qemu_common.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/jenkins/kola/qemu_common.sh b/jenkins/kola/qemu_common.sh index cfffd64a2e..d447dca6cc 100755 --- a/jenkins/kola/qemu_common.sh +++ b/jenkins/kola/qemu_common.sh @@ -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