diff --git a/meta-arm-systemready/lib/oeqa/runtime/cases/arm_systemready_debian_unattended.py b/meta-arm-systemready/lib/oeqa/runtime/cases/arm_systemready_debian_unattended.py new file mode 100644 index 00000000..3c3a2a48 --- /dev/null +++ b/meta-arm-systemready/lib/oeqa/runtime/cases/arm_systemready_debian_unattended.py @@ -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.') diff --git a/meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros-debian.bb b/meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros-debian.bb index 5e5ebc31..fa395f05 100644 --- a/meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros-debian.bb +++ b/meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros-debian.bb @@ -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)}"