summaryrefslogtreecommitdiffstats
path: root/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2017-05-26 09:02:04 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-06 19:02:44 +0100
commit6dcbe845050449dbd4faffcaf7951417400007cb (patch)
tree4b3f79d2972ffc122bac144a0cae528f4b3c72e4 /meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py
parentc4f6c20472bdc26b03ea11b9ddc48c9cb5bc07cf (diff)
downloadpoky-6dcbe845050449dbd4faffcaf7951417400007cb.tar.gz
selftest: Migrate systemd_boot test case to the new framework
- systemd_boot.py: Use the new case class and change decorator for id - __init__.py: Because isn't needed now (From meta-yocto rev: 59b2135007d80b3b76ef1256bf5d5aa6076178bc) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py')
-rw-r--r--meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py b/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py
new file mode 100644
index 0000000000..848cdf7852
--- /dev/null
+++ b/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py
@@ -0,0 +1,52 @@
1import os
2
3from oeqa.selftest.case import OESelftestTestCase
4from oeqa.core.decorator.oeid import OETestID
5from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
6
7class Systemdboot(OESelftestTestCase):
8 def _common_setup(self):
9 """
10 Common setup for test cases: 1445, XXXX
11 """
12
13 # Set EFI_PROVIDER = "gummiboot" and MACHINE = "genericx86-64" in conf/local.conf
14 features = 'EFI_PROVIDER = "systemd-boot"\n'
15 features += 'MACHINE = "genericx86-64"'
16 self.append_config(features)
17
18 def _common_build(self):
19 """
20 Common build for test cases: 1445 , XXXX
21 """
22
23 # Build a genericx86-64/efi gummiboot image
24 bitbake('mtools-native core-image-minimal')
25
26
27 @OETestID(1445)
28 def test_efi_systemdboot_images_can_be_built(self):
29 """
30 Summary: Check if systemd-boot images can be built correctly
31 Expected: 1. File systemd-boot.efi should be available in $poky/build/tmp/deploy/images/genericx86-64
32 2. 'systemd-boot" can be built correctly
33 Product: oe-core
34 Author: Jose Perez Carranza <jose.perez.carranza@intel.com>
35 AutomatedBy: Jose Perez Carranza <jose.perez.carranza@intel.com>
36 """
37
38 # We'd use DEPLOY_DIR_IMAGE here, except that we need its value for
39 # MACHINE="genericx86-64 which is probably not the one configured
40 systemdbootfile = os.path.join(get_bb_var('DEPLOY_DIR'), 'images', 'genericx86-64', 'systemd-bootx64.efi')
41
42 self._common_setup()
43
44 # Ensure we're actually testing that this gets built and not that
45 # it was around from an earlier build
46 bitbake('-c cleansstate systemd-boot')
47 runCmd('rm -f %s' % systemdbootfile)
48
49 self._common_build()
50
51 found = os.path.isfile(systemdbootfile)
52 self.assertTrue(found, 'Systemd-Boot file %s not found' % systemdbootfile)