Skip to contentSkip to conversation

arm-systemready/linux-distros: Implement unattended openSUSE

PATCH Applied Ben 2 participants 4 messages Oct 8, 2024 – Oct 15, 2024

lore
Share & tools
lore

Ben

author
#0 lore raw

PATCH 1/3 arm-systemready/linux-distros: Implement unattended openSUSE

Implement unattended installation for openSUSE

---
 .../arm-systemready-linux-distros-opensuse.bb |  13 +
 .../openSUSE/autoinst.xml                     | 935 ++++++++++++++++++
 2 files changed, 948 insertions(+)
 create mode 100755 meta-arm-systemready/recipes-test/arm-systemready-linux-distros/unattended-boot-conf/openSUSE/autoinst.xml
meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros-opensuse.bb +13 -0
index 06135d15..7d02a258 100644
@@ -72,3 +72,16 @@ ISO_TYPE = "DVD"
 BUILD_NO = "491.1"
 SRC_URI = "https://download.opensuse.org/distribution/leap/${PV}/iso/openSUSE-Leap-${PV}-${ISO_TYPE}-aarch64-Build${BUILD_NO}-Media.iso;unpack=0;downloadfilename=${ISO_IMAGE_NAME}.iso"
 SRC_URI[sha256sum] = "456cc4f99b044429d8a89bd302c06e9e382d6ac4dc590139a7096ebb54f5357b"
+
+ISO_LABEL = "${@oe.utils.vartrue("DISTRO_UNATTENDED_INST_TESTS", "OEMDRV", "", 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)}"
+EFI_IMAGE = "${@oe.utils.vartrue("DISTRO_UNATTENDED_INST_TESTS", "boot/aarch64/efi", "", d)}"
+
+modifyiso() {
+    UNATTENDED_CONF_DIR="${THISDIR}/unattended-boot-conf/openSUSE"
+
+    #create installation configuration files, remove grub timeout, setup network
+    cp "${UNATTENDED_CONF_DIR}/autoinst.xml" ${EXTRACTED_ISO_TEMP_DIR}
+    sed -i 's/timeout=60/timeout=0/g' "${EXTRACTED_ISO_TEMP_DIR}/EFI/BOOT/grub.cfg"
+}
\ No newline at end of file
meta-arm-systemready/recipes-test/arm-systemready-linux-distros/unattended-boot-conf/openSUSE/autoinst.xml new file +935 -0

935 lines not on this page · raw message

Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 2/3 arm-systemready/oeqa: Add unattended installation testcase

Add test for openSUSE unattended installation

---
 .../arm_systemready_opensuse_unattended.py    | 42 +++++++++++++++++++
 .../arm-systemready-linux-distros-opensuse.bb |  2 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta-arm-systemready/lib/oeqa/runtime/cases/arm_systemready_opensuse_unattended.py
meta-arm-systemready/lib/oeqa/runtime/cases/arm_systemready_opensuse_unattended.py new file +42 -0
new file mode 100644
index 00000000..aea8df3e
@@ -0,0 +1,42 @@
+from oeqa.runtime.case import OERuntimeTestCase
+
+class SystemReadyOpenSUSEUnattendedTest(OERuntimeTestCase):
+    def setUp(self):
+        super().setUp()
+        self.console = self.target.DEFAULT_CONSOLE
+
+    def test_opensuse_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,
+                           'Booting `Installation\'',
+                           timeout=(2 * 60))
+        bb.plain('Installation status: Loading the kernel, initrd and basic drivers...')
+
+        self.target.expect(self.console,
+                           'Starting hardware detection...',
+                           timeout=(40 * 60))
+        bb.plain('Installation status: Starting hardware detection...')
+
+        self.target.expect(self.console,
+                           'Loading Installation System',
+                           timeout=(60 * 60))
+        bb.plain('Installation status: Loading Installation System...')
+
+        self.target.expect(self.console,
+                           'Starting Installer',
+                           timeout=(40 * 60))
+        bb.plain('Installation status: Performing Installation...')
+
+        self.target.expect(self.console,
+                           'Finishing Configuration',
+                           timeout=(15 * 60 * 60))
+        bb.plain('Installation status: Finishing Configuration...')
+
+        # Waiting till the installation is finished.
+        self.target.expect(self.console, r'.*login: ', timeout=(6 * 60 * 60))
+        bb.plain('Installation status: openSUSE installation finished successfully.')
meta-arm-systemready/recipes-test/arm-systemready-linux-distros/arm-systemready-linux-distros-opensuse.bb +2 -0
index 7d02a258..33f20587 100644
@@ -73,6 +73,8 @@ BUILD_NO = "491.1"
 SRC_URI = "https://download.opensuse.org/distribution/leap/${PV}/iso/openSUSE-Leap-${PV}-${ISO_TYPE}-aarch64-Build${BUILD_NO}-Media.iso;unpack=0;downloadfilename=${ISO_IMAGE_NAME}.iso"
 SRC_URI[sha256sum] = "456cc4f99b044429d8a89bd302c06e9e382d6ac4dc590139a7096ebb54f5357b"
 
+TEST_SUITES = "${@oe.utils.vartrue("DISTRO_UNATTENDED_INST_TESTS", "arm_systemready_opensuse_unattended", "", d)}"
+
 ISO_LABEL = "${@oe.utils.vartrue("DISTRO_UNATTENDED_INST_TESTS", "OEMDRV", "", 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)}"
Signature · 1 line
2.34.1
author
#2 lore raw

PATCH 3/3 kas: Include unattended openSUSE test

In reply to Ben

Add unattended installation class to openSUSE target

---
 kas/arm-systemready-linux-distros-opensuse.yml | 1 +
 1 file changed, 1 insertion(+)
kas/arm-systemready-linux-distros-opensuse.yml +1 -0
index cffbdb92..d2d75fa2 100644
@@ -2,6 +2,7 @@ header:
   version: 13
   includes:
     - kas/arm-systemready-firmware.yml
+    - kas/arm-systemready-linux-distros-unattended-installation.yml
 
 target:
   - arm-systemready-linux-distros-opensuse
Signature · 1 line
2.34.1
Applied
#3 lore raw
In reply to Ben
Quoted 3 lines · Ben

Implement unattended installation for openSUSE

Applied, thanks!

[1/3] arm-systemready/linux-distros: Implement unattended openSUSE

      commit: 02ba927dfce311df52b468188f1d7349f300ec5a
[2/3] arm-systemready/oeqa: Add unattended installation testcase
      commit: 0e0b9e608c7fcafe054a4ed8a7bf472ebeb38236
[3/3] kas: Include unattended openSUSE test
      commit: 33fa7e75edd76cba0cd55bbce4efe8acb7b4f648

Best regards,

Signature · 1 line
Jon Mason <[email protected]>