Merge pull request #239 from flatcar-linux/t-lo/ci-automation-add-qemu-uefi-test

ci-automation/vendor-testing: add qemu_uefi
This commit is contained in:
Thilo Fromm 2022-02-25 12:15:01 +01:00 committed by GitHub
commit 88a4df98b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 7 deletions

View File

@ -27,6 +27,19 @@ CI_GIT_EMAIL="infra+ci@flatcar-linux.org"
CONTAINER_TORCX_ROOT="/home/sdk/build/torcx"
CONTAINER_IMAGE_ROOT="/home/sdk/build/images"
#
# Image / vendor tests settings
#
# -- QEMU --
QEMU_IMAGE_NAME="flatcar_production_image.bin"
QEMU_PARALLEL="${PARALLEL_TESTS:-20}"
# BIOS path within the SDK
QEMU_BIOS="/usr/share/qemu/bios-256k.bin"
# UEFI bios filename on build cache.
# Published by vms.sh as part of the qemu vendor build.
QEMU_UEFI_BIOS="flatcar_production_qemu_uefi_efi_code.fd"

View File

@ -20,20 +20,44 @@ source ci-automation/ci_automation_common.sh
mkdir -p "${work_dir}"
cd "${work_dir}"
testscript="$(basename "$0")"
# ARM64 qemu tests only supported on UEFI
if [ "${arch}" = "arm64" ] && [ "${testscript}" != "qemu_uefi.sh" ] ; then
echo "1..1" > "${tapfile}"
echo "not ok - all qemu tests" >> "${tapfile}"
echo " ---" >> "${tapfile}"
echo " ERROR: ARM64 tests only supported on qemu_uefi." | tee -a "${tapfile}"
echo " ..." >> "${tapfile}"
exit 1
fi
# Fetch image and BIOS if not present
if [ -f "${QEMU_IMAGE_NAME}" ] ; then
echo "++++ QEMU test: Using existing ${work_dir}/${QEMU_IMAGE_NAME} for testing ${vernum} (${arch}) ++++"
echo "++++ ${testscript}: Using existing ${work_dir}/${QEMU_IMAGE_NAME} for testing ${vernum} (${arch}) ++++"
else
echo "++++ QEMU test: downloading ${QEMU_IMAGE_NAME} for ${vernum} (${arch}) ++++"
echo "++++ ${testscript}: downloading ${QEMU_IMAGE_NAME} for ${vernum} (${arch}) ++++"
copy_from_buildcache "images/${arch}/${vernum}/${QEMU_IMAGE_NAME}" .
fi
bios="${QEMU_BIOS}"
if [ "${testscript}" = "qemu_uefi.sh" ] ; then
bios="${QEMU_UEFI_BIOS}"
if [ -f "${bios}" ] ; then
echo "++++ ${testscript}: Using existing ${work_dir}/${bios} ++++"
else
echo "++++ ${testscript}: downloading ${bios} for ${vernum} (${arch}) ++++"
copy_from_buildcache "images/${arch}/${vernum}/${bios}" .
fi
fi
set -o noglob
sudo kola run \
--board="${arch}-usr" \
--parallel="${QEMU_PARALLEL}" \
--platform=qemu \
--qemu-bios=/usr/share/qemu/bios-256k.bin \
--qemu-bios=${bios} \
--qemu-image="${QEMU_IMAGE_NAME}" \
--tapfile="${tapfile}" \
--torcx-manifest=../torcx_manifest.json \

View File

@ -0,0 +1 @@
qemu.sh

View File

@ -1,4 +1,4 @@
FLATCAR_VERSION=3139.0.0
FLATCAR_VERSION_ID=3139.0.0
FLATCAR_BUILD_ID=""
FLATCAR_SDK_VERSION=3139.0.0
FLATCAR_VERSION=3160.0.0+nightly-20220224-0139
FLATCAR_VERSION_ID=3160.0.0
FLATCAR_BUILD_ID="nightly-20220224-0139"
FLATCAR_SDK_VERSION=3160.0.0+nightly-20220224-0139