This is regression test for [1]. [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=15033
Signed-off-by: Pavel Zhukov <pa...@zhukoff.net> --- meta-selftest/wic/test_uefikernel.wks | 5 +++++ meta/lib/oeqa/selftest/cases/wic.py | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 meta-selftest/wic/test_uefikernel.wks diff --git a/meta-selftest/wic/test_uefikernel.wks b/meta-selftest/wic/test_uefikernel.wks new file mode 100644 index 0000000000..bede2288f6 --- /dev/null +++ b/meta-selftest/wic/test_uefikernel.wks @@ -0,0 +1,5 @@ +# short-description: This file is used in oe-selftest wic module to test uefi-kernel loader + +part /boot --source bootimg-efi --sourceparams="loader=uefi-kernel" +part / --source rootfs --fstype=ext4 --align 1024 --use-uuid + diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py index ca1abb970a..b9430cdb3b 100644 --- a/meta/lib/oeqa/selftest/cases/wic.py +++ b/meta/lib/oeqa/selftest/cases/wic.py @@ -1151,6 +1151,26 @@ class Wic2(WicTestCase): out = glob(os.path.join(self.resultdir, "%s-*.direct" % wksname)) self.assertEqual(1, len(out)) + @skipIfNotArch(['i586', 'i686', 'x86_64', 'aarch64']) + def test_uefi_kernel(self): + """ Test uefi-kernel in wic """ + config = 'IMAGE_EFI_BOOT_FILES="/etc/fstab;testfile"\nIMAGE_FSTYPES = "wic"\nWKS_FILE = "test_uefikernel.wks"\nMACHINE_FEATURES:append = " efi"\n' + self.append_config(config) + bitbake('core-image-minimal') + self.remove_config(config) + + img = 'core-image-minimal' + with NamedTemporaryFile("w", suffix=".wks") as wks: + wks.writelines(['part /boot --source bootimg-efi --sourceparams="loader=uefi-kernel"\n' + 'part / --source rootfs --fstype=ext4 --align 1024 --use-uuid\n'\ + 'bootloader --timeout=0 --append="console=ttyS0,115200n8"\n']) + wks.flush() + cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir) + runCmd(cmd) + wksname = os.path.splitext(os.path.basename(wks.name))[0] + out = glob(os.path.join(self.resultdir, "%s-*.direct" % wksname)) + self.assertEqual(1, len(out)) + # TODO this test could also work on aarch64 @skipIfNotArch(['i586', 'i686', 'x86_64']) @OETestTag("runqemu") -- 2.39.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#177720): https://lists.openembedded.org/g/openembedded-core/message/177720 Mute This Topic: https://lists.openembedded.org/mt/97234707/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-