summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/efibootpartition.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/efibootpartition.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/efibootpartition.py45
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/efibootpartition.py b/meta/lib/oeqa/selftest/cases/efibootpartition.py
new file mode 100644
index 0000000000..0c83256696
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/efibootpartition.py
@@ -0,0 +1,45 @@
1# Based on runqemu.py test file
2#
3# Copyright (c) 2017 Wind River Systems, Inc.
4#
5
6import re
7
8from oeqa.selftest.case import OESelftestTestCase
9from oeqa.utils.commands import bitbake, runqemu, get_bb_var
10
11class GenericEFITest(OESelftestTestCase):
12 """EFI booting test class"""
13
14 buffer = True
15 cmd_common = "runqemu nographic serial wic ovmf"
16 efi_provider = "systemd-boot"
17 image = "core-image-minimal"
18 machine = "qemux86-64"
19 recipes_built = False
20
21 @classmethod
22 def setUpLocal(self):
23 super(GenericEFITest, self).setUpLocal(self)
24
25 self.write_config(self,
26"""
27EFI_PROVIDER = "%s"
28IMAGE_FSTYPES_pn-%s_append = " wic"
29MACHINE = "%s"
30MACHINE_FEATURES_append = " efi"
31WKS_FILE = "efi-bootdisk.wks.in"
32IMAGE_INSTALL_append = " grub-efi systemd-boot kernel-image-bzimage"
33"""
34% (self.efi_provider, self.image, self.machine))
35 if not self.recipes_built:
36 bitbake("ovmf")
37 bitbake(self.image)
38 self.recipes_built = True
39
40 @classmethod
41 def test_boot_efi(self):
42 """Test generic boot partition with qemu"""
43 cmd = "%s %s" % (self.cmd_common, self.machine)
44 with runqemu(self.image, ssh=False, launch_cmd=cmd) as qemu:
45 self.assertTrue(qemu.runner.logged, "Failed: %s" % cmd)