diff options
author | Pavel Zhukov <pavel@zhukoff.net> | 2023-02-25 22:20:04 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-26 11:49:00 +0000 |
commit | 2e18bbb307e050650845314f7837cc4d5d8aea86 (patch) | |
tree | 7fc5da7ac904eb453e624f8fd88d07094392e7b0 /meta/lib | |
parent | 4add8776ab6927304296c916ee015fa0f57389ba (diff) | |
download | poky-2e18bbb307e050650845314f7837cc4d5d8aea86.tar.gz |
oeqa/selftest/wic: Add test for uefi-kernel loader
This is regression test for [1].
[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=15033
(From OE-Core rev: d8ef15bb9ef652bf85002fe523ff5060b47bca6a)
Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/wic.py | 20 |
1 files changed, 20 insertions, 0 deletions
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): | |||
1151 | out = glob(os.path.join(self.resultdir, "%s-*.direct" % wksname)) | 1151 | out = glob(os.path.join(self.resultdir, "%s-*.direct" % wksname)) |
1152 | self.assertEqual(1, len(out)) | 1152 | self.assertEqual(1, len(out)) |
1153 | 1153 | ||
1154 | @skipIfNotArch(['i586', 'i686', 'x86_64', 'aarch64']) | ||
1155 | def test_uefi_kernel(self): | ||
1156 | """ Test uefi-kernel in wic """ | ||
1157 | config = 'IMAGE_EFI_BOOT_FILES="/etc/fstab;testfile"\nIMAGE_FSTYPES = "wic"\nWKS_FILE = "test_uefikernel.wks"\nMACHINE_FEATURES:append = " efi"\n' | ||
1158 | self.append_config(config) | ||
1159 | bitbake('core-image-minimal') | ||
1160 | self.remove_config(config) | ||
1161 | |||
1162 | img = 'core-image-minimal' | ||
1163 | with NamedTemporaryFile("w", suffix=".wks") as wks: | ||
1164 | wks.writelines(['part /boot --source bootimg-efi --sourceparams="loader=uefi-kernel"\n' | ||
1165 | 'part / --source rootfs --fstype=ext4 --align 1024 --use-uuid\n'\ | ||
1166 | 'bootloader --timeout=0 --append="console=ttyS0,115200n8"\n']) | ||
1167 | wks.flush() | ||
1168 | cmd = "wic create %s -e %s -o %s" % (wks.name, img, self.resultdir) | ||
1169 | runCmd(cmd) | ||
1170 | wksname = os.path.splitext(os.path.basename(wks.name))[0] | ||
1171 | out = glob(os.path.join(self.resultdir, "%s-*.direct" % wksname)) | ||
1172 | self.assertEqual(1, len(out)) | ||
1173 | |||
1154 | # TODO this test could also work on aarch64 | 1174 | # TODO this test could also work on aarch64 |
1155 | @skipIfNotArch(['i586', 'i686', 'x86_64']) | 1175 | @skipIfNotArch(['i586', 'i686', 'x86_64']) |
1156 | @OETestTag("runqemu") | 1176 | @OETestTag("runqemu") |