1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-01-11 15:00:39 +00:00

arm-systemready/oeqa: Add unattended installation testcase

Add test for Debian unattended installation verification

Signed-off-by: Musa Antike <musa.antike@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Musa Antike
2025-01-15 13:56:05 +00:00
committed by Jon Mason
parent f0978b3067
commit f1769d5640
2 changed files with 69 additions and 1 deletions

View File

@@ -0,0 +1,66 @@
from oeqa.runtime.case import OERuntimeTestCase
class SystemReadyDebianUnattendedTest(OERuntimeTestCase):
def setUp(self):
super().setUp()
self.console = self.target.DEFAULT_CONSOLE
def test_debian_unattended(self):
# Turn on the FVP.
self.target.transition('on')
# Timeout value = elapsed time * 2; where elapsed time was collected
# from the elapsed time in the log.do_testimage for each function after
# the build is finished on the development machine.
self.target.expect(self.console,
r'.*Scanning installation',
timeout=(20 * 60))
bb.plain('Installation status: Scanning installation media...')
self.target.expect(self.console,
r'.*Detecting network hardware',
timeout=(35 * 60))
bb.plain('Installation status: Detecting network hardware...')
self.target.expect(self.console,
r'.*Installing the base system',
timeout=(35 * 60))
bb.plain('Installation status: Installing the base system...')
self.target.expect(self.console,
r'.*Installing GRUB',
timeout=(7 * 60 * 60))
bb.plain('Installation status: Installing GRUB...')
# Waiting to respond to the boot loader prompt error message.
self.target.expect(self.console,
r'.*Press enter to continue',
timeout=(15 * 60))
self.target.sendline(self.console, '')
self.target.expect(self.console,
r'.*Press enter to continue',
timeout=(60))
self.target.sendline(self.console, '')
# Waiting to respond continue without bootloader to install
# bootloader with the late script in preseed.cfg at the end.
self.target.expect(self.console,
r'.*Continue without boot loader',
timeout=(2 * 60))
self.target.sendline(self.console, '14')
self.target.expect(self.console,
r'.*Press enter to continue',
timeout=(60))
self.target.sendline(self.console, '')
self.target.expect(self.console,
r'.*Finishing the installation',
timeout=(2 * 60))
bb.plain('Installation status: Finishing the installation...')
# Waiting till the installation is finished.
self.target.expect(self.console, r'.*login:', timeout=(40 * 60))
bb.plain('Installation status: Debian installation finished successfully.')

View File

@@ -100,11 +100,13 @@ file://${COMMON_LICENSE_DIR}/PD;md5=b3597d12946881e13cb3b548d1173851 \
PV = "12.8.0"
SRC_URI = "\
https://cdimage.debian.org/debian-cd/12.8.0/arm64/iso-dvd/debian-12.8.0-arm64-DVD-1.iso;unpack=0;downloadfilename=${ISO_IMAGE_NAME}.iso;name=debian_iso_image \
https://cdimage.debian.org/mirror/cdimage/archive/12.8.0/arm64/iso-dvd/debian-12.8.0-arm64-DVD-1.iso;unpack=0;downloadfilename=${ISO_IMAGE_NAME}.iso;name=debian_iso_image \
file://unattended-boot-conf/Debian/preseed.cfg \
"
SRC_URI[debian_iso_image.sha256sum] = "8891fe48bb5a58ae54176eaa6440059bf852044d6b9ae77219e78f9ef8d65149"
TEST_SUITES = "${@oe.utils.vartrue("DISTRO_UNATTENDED_INST_TESTS", "arm_systemready_debian_unattended", "", d)}"
ISO_LABEL = "${@oe.utils.vartrue("DISTRO_UNATTENDED_INST_TESTS", "debian-12.8.0-arm64-1", "", d)}"
BOOT_CATALOG = "${@oe.utils.vartrue("DISTRO_UNATTENDED_INST_TESTS", "boot.catalog", "", d)}"
BOOT_IMAGE = "${@oe.utils.vartrue("DISTRO_UNATTENDED_INST_TESTS", "EFI/boot/bootaa64.efi", "", d)}"