summaryrefslogtreecommitdiffstats
path: root/meta-yocto-bsp/lib/oeqa
diff options
context:
space:
mode:
Diffstat (limited to 'meta-yocto-bsp/lib/oeqa')
-rw-r--r--meta-yocto-bsp/lib/oeqa/controllers/__init__.py0
-rw-r--r--meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py97
-rw-r--r--meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py70
-rw-r--r--meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-beaglebone-yocto.txt4
-rw-r--r--meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-genericarm64.txt11
-rw-r--r--meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-genericx86-64.txt7
-rw-r--r--meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py74
7 files changed, 0 insertions, 263 deletions
diff --git a/meta-yocto-bsp/lib/oeqa/controllers/__init__.py b/meta-yocto-bsp/lib/oeqa/controllers/__init__.py
deleted file mode 100644
index e69de29bb2..0000000000
--- a/meta-yocto-bsp/lib/oeqa/controllers/__init__.py
+++ /dev/null
diff --git a/meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py b/meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py
deleted file mode 100644
index 7af3e1dac7..0000000000
--- a/meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py
+++ /dev/null
@@ -1,97 +0,0 @@
1# Copyright (C) 2014 Intel Corporation
2#
3# Released under the MIT license (see COPYING.MIT)
4
5# This module adds support to testimage.bbclass to deploy images and run
6# tests on a BeagleBone (original "white" or Black models). The device must
7# be set up as per README.hardware and the master image should be deployed
8# onto the card so that it boots into it by default. For booting into the
9# image under test we interact with u-boot over serial, so for the
10# BeagleBone Black you will need an additional TTL serial cable since a
11# serial interface isn't automatically provided over the USB connection as
12# it is on the original BeagleBone ("white") version. The separate ext3
13# partition that will contain the image to be tested must be labelled
14# "testrootfs" so that the deployment code below can find it.
15#
16# NOTE: for the BeagleBone "white" (original version) you may need to use
17# a script which handles the serial device disappearing on power down, such
18# as scripts/contrib/serdevtry in OE-Core.
19
20import os
21import bb
22import time
23import subprocess
24import sys
25import pexpect
26
27from oeqa.controllers.controllerimage import ControllerImageHardwareTarget
28
29
30class BeagleBoneTarget(ControllerImageHardwareTarget):
31
32 dtbs = {'uImage-am335x-bone.dtb': 'am335x-bone.dtb', 'uImage-am335x-boneblack.dtb': 'am335x-boneblack.dtb'}
33
34 @classmethod
35 def get_extra_files(self):
36 return list(self.dtbs.keys())
37
38 def __init__(self, d):
39 super(BeagleBoneTarget, self).__init__(d)
40
41 self.image_fstype = self.get_image_fstype(d)
42 self.deploy_cmds = [
43 'mkdir -p /mnt/testrootfs',
44 'mount -L testrootfs /mnt/testrootfs',
45 'rm -rf /mnt/testrootfs/*',
46 'tar xvf ~/test-rootfs.%s -C /mnt/testrootfs' % self.image_fstype,
47 '[ -e /mnt/testrootfs/boot/uImage ] || [ -L /mnt/testrootfs/boot/uImage ] || cp ~/test-kernel /mnt/testrootfs/boot/uImage',
48 ]
49
50 for _, dtbfn in self.dtbs.iteritems():
51 # Kernel and dtb files may not be in the image, so copy them if not
52 self.deploy_cmds.append('[ -e /mnt/testrootfs/boot/{0} ] || cp ~/{0} /mnt/testrootfs/boot/'.format(dtbfn))
53
54 if not self.serialcontrol_cmd:
55 bb.fatal("This TEST_TARGET needs a TEST_SERIALCONTROL_CMD defined in local.conf.")
56
57
58 def _deploy(self):
59 self.controller.run("umount /boot; umount /mnt/testrootfs;")
60 self.controller.ignore_status = False
61 # Kernel and dtb files may not be in the image, so copy them just in case
62 self.controller.copy_to(self.kernel, "~/test-kernel")
63 kernelpath = os.path.dirname(self.kernel)
64 for dtborig, dtbfn in self.dtbs.iteritems():
65 dtbfile = os.path.join(kernelpath, dtborig)
66 if os.path.exists(dtbfile):
67 self.controller.copy_to(dtbfile, "~/%s" % dtbfn)
68 self.controller.copy_to(self.rootfs, "~/test-rootfs.%s" % self.image_fstype)
69 for cmd in self.deploy_cmds:
70 self.controller.run(cmd)
71
72 def _start(self, params=None):
73 self.power_cycle(self.controller)
74 try:
75 serialconn = pexpect.spawn(self.serialcontrol_cmd, env=self.origenv, logfile=sys.stdout)
76 # We'd wait for "U-Boot" here but sometimes we connect too late on BeagleBone white to see it
77 serialconn.expect("NAND:")
78 serialconn.expect("MMC:")
79 serialconn.sendline("a")
80 serialconn.expect("U-Boot#")
81 serialconn.sendline("setenv bootpart 0:3")
82 serialconn.expect("U-Boot#")
83 serialconn.sendline("setenv mmcroot /dev/mmcblk0p3 ro")
84 serialconn.expect("U-Boot#")
85 serialconn.sendline("boot")
86 serialconn.expect("login:", timeout=120)
87 serialconn.close()
88 except pexpect.ExceptionPexpect as e:
89 bb.fatal('Serial interaction failed: %s' % str(e))
90
91 def _wait_until_booted(self):
92 try:
93 serialconn = pexpect.spawn(self.serialcontrol_cmd, env=self.origenv, logfile=sys.stdout)
94 serialconn.expect("login:", timeout=120)
95 serialconn.close()
96 except pexpect.ExceptionPexpect as e:
97 bb.fatal('Serial interaction failed: %s' % str(e))
diff --git a/meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py b/meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py
deleted file mode 100644
index c3a98979c5..0000000000
--- a/meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py
+++ /dev/null
@@ -1,70 +0,0 @@
1# Copyright (C) 2014 Intel Corporation
2#
3# Released under the MIT license (see COPYING.MIT)
4
5# This module adds support to testimage.bbclass to deploy images and run
6# tests on a Generic PC that boots using grub bootloader. The device must
7# be set up as per README.hardware and the master image should be deployed
8# onto the harddisk so that it boots into it by default.For booting into the
9# image under test we interact with grub over serial, so for the
10# Generic PC you will need an additional serial cable and device under test
11# needs to have a serial interface. The separate ext3
12# partition that will contain the image to be tested must be labelled
13# "testrootfs" so that the deployment code below can find it.
14
15import os
16import bb
17import time
18import subprocess
19import sys
20import pexpect
21
22from oeqa.controllers.controllerimage import ControllerImageHardwareTarget
23
24class GrubTarget(ControllerImageHardwareTarget):
25
26 def __init__(self, d):
27 super(GrubTarget, self).__init__(d)
28 self.deploy_cmds = [
29 'mount -L boot /boot',
30 'mkdir -p /mnt/testrootfs',
31 'mount -L testrootfs /mnt/testrootfs',
32 'cp ~/test-kernel /boot',
33 'rm -rf /mnt/testrootfs/*',
34 'tar xvf ~/test-rootfs.%s -C /mnt/testrootfs' % self.image_fstype,
35 ]
36
37 if not self.serialcontrol_cmd:
38 bb.fatal("This TEST_TARGET needs a TEST_SERIALCONTROL_CMD defined in local.conf.")
39
40
41 def _deploy(self):
42 # make sure these aren't mounted
43 self.controller.run("umount /boot; umount /mnt/testrootfs;")
44 self.controller.ignore_status = False
45 # Kernel files may not be in the image, so copy them just in case
46 self.controller.copy_to(self.rootfs, "~/test-rootfs." + self.image_fstype)
47 self.controller.copy_to(self.kernel, "~/test-kernel")
48 for cmd in self.deploy_cmds:
49 self.controller.run(cmd)
50
51 def _start(self, params=None):
52 self.power_cycle(self.controller)
53 try:
54 serialconn = pexpect.spawn(self.serialcontrol_cmd, env=self.origenv, logfile=sys.stdout)
55 serialconn.expect("GNU GRUB version 2.00")
56 serialconn.expect("Linux")
57 serialconn.sendline("x")
58 serialconn.expect("login:", timeout=120)
59 serialconn.close()
60 except pexpect.ExceptionPexpect as e:
61 bb.fatal('Serial interaction failed: %s' % str(e))
62
63 def _wait_until_booted(self):
64 try:
65 serialconn = pexpect.spawn(self.serialcontrol_cmd, env=self.origenv, logfile=sys.stdout)
66 serialconn.expect("login:", timeout=120)
67 serialconn.close()
68 except pexpect.ExceptionPexpect as e:
69 bb.fatal('Serial interaction failed: %s' % str(e))
70
diff --git a/meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-beaglebone-yocto.txt b/meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-beaglebone-yocto.txt
deleted file mode 100644
index b0d98418d1..0000000000
--- a/meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-beaglebone-yocto.txt
+++ /dev/null
@@ -1,4 +0,0 @@
1# These should be reviewed to see if they are still needed
2l4_wkup_cm
3Failed to make EGL context current
4glamor initialization failed \ No newline at end of file
diff --git a/meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-genericarm64.txt b/meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-genericarm64.txt
deleted file mode 100644
index 3e96a172da..0000000000
--- a/meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-genericarm64.txt
+++ /dev/null
@@ -1,11 +0,0 @@
1# safe to ignore minor firmware issue
2zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: failed to set: pin
3zynqmp-pinctrl firmware:zynqmp-firmware:pinctrl: set mux failed for pin
4request failed for node
5error -EACCES: failed to add to PM domain domain
6probe with driver sdhci-arasan failed with error
7Error applying setting, reverse things back
8# safe to ignore initrd warning
9Can't lookup blockdev
10# X11 fails to start without connected display
11modeset(0): failed to set mode: Invalid argument
diff --git a/meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-genericx86-64.txt b/meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-genericx86-64.txt
deleted file mode 100644
index 9a655564cd..0000000000
--- a/meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-genericx86-64.txt
+++ /dev/null
@@ -1,7 +0,0 @@
1# These should be reviewed to see if they are still needed
2Direct firmware load for i915
3Failed to load firmware i915
4Failed to fetch GuC
5Failed to initialize GuC
6Failed to load DMC firmware
7The driver is built-in, so to load the firmware you need to \ No newline at end of file
diff --git a/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py b/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py
deleted file mode 100644
index 781763d1f1..0000000000
--- a/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py
+++ /dev/null
@@ -1,74 +0,0 @@
1import os
2
3from oeqa.selftest.case import OESelftestTestCase
4from oeqa.core.decorator.depends import OETestDepends
5from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, runqemu
6
7class Systemdboot(OESelftestTestCase):
8
9 def test_efi_systemdboot_images_can_be_built(self):
10 """
11 Summary: Check if systemd-boot images can be built correctly
12 Expected: 1. File systemd-boot.efi should be available in $poky/build/tmp/deploy/images/genericx86-64
13 2. 'systemd-boot" can be built correctly
14 Product: oe-core
15 Author: Jose Perez Carranza <jose.perez.carranza@intel.com>
16 AutomatedBy: Jose Perez Carranza <jose.perez.carranza@intel.com>
17 """
18
19 # Set EFI_PROVIDER = "systemdboot" and MACHINE = "genericx86-64" in conf/local.conf
20 features = 'EFI_PROVIDER = "systemd-boot"\n'
21 features += 'MACHINE = "genericx86-64"\n'
22 features += 'IMAGE_FSTYPES += "wic"\n'
23 features += 'COMPATIBLE_MACHINE:pn-ssh-pregen-hostkeys:genericx86-64 = "genericx86-64"\n'
24 self.append_config(features)
25
26 image = 'core-image-minimal'
27 bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'], image)
28 systemdbootfile = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], 'systemd-bootx64.efi')
29
30 # Ensure we're actually testing that this gets built and not that
31 # it was around from an earlier build
32 bitbake('-c clean systemd-boot')
33 runCmd('rm -f %s' % systemdbootfile)
34
35 # Build a genericx86-64/efi systemdboot image
36 bitbake('mtools-native core-image-minimal wic-tools')
37
38 found = os.path.isfile(systemdbootfile)
39 self.assertTrue(found, 'Systemd-Boot file %s not found' % systemdbootfile)
40
41 """
42 Summary: Check if EFI bootloader for systemd is correctly build
43 Dependencies: Image was built correctly on testcase 1445
44 Steps: 1. Copy bootx64.efi file from the wic created
45 under build/tmp/deploy/images/genericx86-64
46 2. Check bootx64.efi was copied from wic
47 3. Verify the checksums from the copied and previously
48 created file are equal.
49 Expected : Systemd-bootx64.efi and bootx64.efi should be the same
50 hence checksums should be equal.
51 Product: oe-core
52 Author: Jose Perez Carranza <jose.perez.carranza at linux-intel.com>
53 AutomatedBy: Jose Perez Carranza <jose.perez.carranza at linux-intel.com>
54 """
55
56 systemdbootimage = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], '%s.wic' % bb_vars['IMAGE_LINK_NAME'])
57 imagebootfile = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], 'bootx64.efi')
58
59 # Clean environment before start the test
60 if os.path.isfile(imagebootfile):
61 runCmd('rm -f %s' % imagebootfile)
62
63 sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools')
64
65 runCmd('wic cp %s:1/EFI/BOOT/bootx64.efi %s -n %s' % (systemdbootimage,
66 imagebootfile, sysroot))
67
68 found = os.path.isfile(imagebootfile)
69 self.assertTrue(found, 'bootx64.efi file %s was not copied from image'
70 % imagebootfile)
71
72 result = runCmd('md5sum %s %s' % (systemdbootfile, imagebootfile))
73 self.assertEqual(result.output.split()[0], result.output.split()[2],
74 '%s was not correclty generated' % imagebootfile)