From 8a8d34f51b136d75d9cdf691aa43030b9154540d Mon Sep 17 00:00:00 2001 From: Peter Grzybowski Date: Wed, 2 Feb 2022 19:10:42 +0100 Subject: [PATCH] MEN-5257 Debian 11 tests support. ChangeLog:title Signed-off-by: Peter Grzybowski --- .gitlab-ci.yml | 5 +++++ configs/debian-qemux86-64_config | 22 ++++++++++++++++++++++ scripts/test/run-tests.sh | 14 ++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 configs/debian-qemux86-64_config diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c37ab70..9d029e8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -225,6 +225,11 @@ test_acceptance_qemux86_64: script: - ./scripts/test/run-tests.sh --config versions_override_config --only qemux86_64 +test_acceptance_debian_qemux86_64: + <<: *test_acceptance + script: + - ./scripts/test/run-tests.sh --config versions_override_config --only debian-qemux86_64 + test_acceptance_raspberrypi: <<: *test_acceptance script: diff --git a/configs/debian-qemux86-64_config b/configs/debian-qemux86-64_config new file mode 100644 index 0000000..d26fb19 --- /dev/null +++ b/configs/debian-qemux86-64_config @@ -0,0 +1,22 @@ +# This configuration can be used to run on a qemux86-64 machine. +# +# The image is generated with the following command: +# +# mkosi --root-size=2G --distribution=debian --release=bullseye --format=gpt_ext4 --bootable --checksum +# --password password --package=openssh-server,dhcpcd5 --output=Debian-11-x86-64.img build +# +# Then manually uploaded to Mender's AWS S3 bucket for CI testing +# +# Locally, converted with the following command: +# +# MENDER_ARTIFACT_NAME=release-1 ./docker-mender-convert --disk-image input/Debian-11-x86-64.img --overlay rootfs_overlay_demo --config configs/qemux86-64_config +# +# and qemu is executed with the following command: +# +# qemu-system-x86_64 -enable-kvm -m 512 -smp 2 -bios /usr/share/OVMF/OVMF_CODE.fd -drive format=raw,file=deploy/Debian-11-x86-64-qemux86_64-mender.img + +MENDER_STORAGE_DEVICE_BASE=/dev/sda +MENDER_DEVICE_TYPE="qemux86_64" + +# Nothing to copy +MENDER_COPY_BOOT_GAP="n" diff --git a/scripts/test/run-tests.sh b/scripts/test/run-tests.sh index 3afecd9..0a2890f 100755 --- a/scripts/test/run-tests.sh +++ b/scripts/test/run-tests.sh @@ -28,6 +28,8 @@ RASPBIAN_IMAGE_URL="http://downloads.raspberrypi.org/raspbian_lite/images/raspbi UBUNTU_IMAGE_URL="https://downloads.mender.io/mender-convert/images/Ubuntu-Focal-x86-64.img.gz" +DEBIAN_IMAGE_URL="https://downloads.mender.io/mender-convert/images/Debian-11-x86-64.img.gz" + ## Auto-update UBUNTU_SERVER_RPI_IMAGE_URL="http://cdimage.ubuntu.com/ubuntu/releases/20.04/release/ubuntu-20.04.3-preinstalled-server-armhf+raspi.img.xz" @@ -160,5 +162,17 @@ else || test_result=$? fi + if [ "$TEST_ALL" == "1" -o "$TEST_PLATFORM" == "debian-qemux86_64" ]; then + wget --progress=dot:giga -N ${DEBIAN_IMAGE_URL} -P input/ + convert_and_test "qemux86_64" \ + "release-1" \ + "input/Debian-11-x86-64.img.gz" \ + "--overlay tests/ssh-public-key-overlay" \ + "--config configs/debian-qemux86-64_config $EXTRA_CONFIG" \ + || test_result=$? + fi + + + exit $test_result fi