mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 14:11:07 +02:00
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:
commit
88a4df98b1
@ -27,6 +27,19 @@ CI_GIT_EMAIL="infra+ci@flatcar-linux.org"
|
|||||||
CONTAINER_TORCX_ROOT="/home/sdk/build/torcx"
|
CONTAINER_TORCX_ROOT="/home/sdk/build/torcx"
|
||||||
CONTAINER_IMAGE_ROOT="/home/sdk/build/images"
|
CONTAINER_IMAGE_ROOT="/home/sdk/build/images"
|
||||||
|
|
||||||
|
#
|
||||||
# Image / vendor tests settings
|
# Image / vendor tests settings
|
||||||
|
#
|
||||||
|
|
||||||
|
# -- QEMU --
|
||||||
|
|
||||||
QEMU_IMAGE_NAME="flatcar_production_image.bin"
|
QEMU_IMAGE_NAME="flatcar_production_image.bin"
|
||||||
QEMU_PARALLEL="${PARALLEL_TESTS:-20}"
|
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"
|
||||||
|
|
||||||
|
@ -20,20 +20,44 @@ source ci-automation/ci_automation_common.sh
|
|||||||
mkdir -p "${work_dir}"
|
mkdir -p "${work_dir}"
|
||||||
cd "${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
|
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
|
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}" .
|
copy_from_buildcache "images/${arch}/${vernum}/${QEMU_IMAGE_NAME}" .
|
||||||
fi
|
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
|
set -o noglob
|
||||||
|
|
||||||
sudo kola run \
|
sudo kola run \
|
||||||
--board="${arch}-usr" \
|
--board="${arch}-usr" \
|
||||||
--parallel="${QEMU_PARALLEL}" \
|
--parallel="${QEMU_PARALLEL}" \
|
||||||
--platform=qemu \
|
--platform=qemu \
|
||||||
--qemu-bios=/usr/share/qemu/bios-256k.bin \
|
--qemu-bios=${bios} \
|
||||||
--qemu-image="${QEMU_IMAGE_NAME}" \
|
--qemu-image="${QEMU_IMAGE_NAME}" \
|
||||||
--tapfile="${tapfile}" \
|
--tapfile="${tapfile}" \
|
||||||
--torcx-manifest=../torcx_manifest.json \
|
--torcx-manifest=../torcx_manifest.json \
|
||||||
|
1
ci-automation/vendor-testing/qemu_uefi.sh
Symbolic link
1
ci-automation/vendor-testing/qemu_uefi.sh
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
qemu.sh
|
@ -1,4 +1,4 @@
|
|||||||
FLATCAR_VERSION=3139.0.0
|
FLATCAR_VERSION=3160.0.0+nightly-20220224-0139
|
||||||
FLATCAR_VERSION_ID=3139.0.0
|
FLATCAR_VERSION_ID=3160.0.0
|
||||||
FLATCAR_BUILD_ID=""
|
FLATCAR_BUILD_ID="nightly-20220224-0139"
|
||||||
FLATCAR_SDK_VERSION=3139.0.0
|
FLATCAR_SDK_VERSION=3160.0.0+nightly-20220224-0139
|
||||||
|
Loading…
x
Reference in New Issue
Block a user