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/beaglebonetarget.py19
-rw-r--r--meta-yocto-bsp/lib/oeqa/controllers/edgeroutertarget.py90
-rw-r--r--meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py17
-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-genericx86-64.txt7
-rw-r--r--meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py11
6 files changed, 34 insertions, 114 deletions
diff --git a/meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py b/meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py
index 0f1aeb398f..7af3e1dac7 100644
--- a/meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py
+++ b/meta-yocto-bsp/lib/oeqa/controllers/beaglebonetarget.py
@@ -24,11 +24,10 @@ import subprocess
import sys
import pexpect
-import oeqa.utils.sshcontrol as sshcontrol
-from oeqa.controllers.masterimage import MasterImageHardwareTarget
+from oeqa.controllers.controllerimage import ControllerImageHardwareTarget
-class BeagleBoneTarget(MasterImageHardwareTarget):
+class BeagleBoneTarget(ControllerImageHardwareTarget):
dtbs = {'uImage-am335x-bone.dtb': 'am335x-bone.dtb', 'uImage-am335x-boneblack.dtb': 'am335x-boneblack.dtb'}
@@ -57,21 +56,21 @@ class BeagleBoneTarget(MasterImageHardwareTarget):
def _deploy(self):
- self.master.run("umount /boot; umount /mnt/testrootfs;")
- self.master.ignore_status = False
+ self.controller.run("umount /boot; umount /mnt/testrootfs;")
+ self.controller.ignore_status = False
# Kernel and dtb files may not be in the image, so copy them just in case
- self.master.copy_to(self.kernel, "~/test-kernel")
+ self.controller.copy_to(self.kernel, "~/test-kernel")
kernelpath = os.path.dirname(self.kernel)
for dtborig, dtbfn in self.dtbs.iteritems():
dtbfile = os.path.join(kernelpath, dtborig)
if os.path.exists(dtbfile):
- self.master.copy_to(dtbfile, "~/%s" % dtbfn)
- self.master.copy_to(self.rootfs, "~/test-rootfs.%s" % self.image_fstype)
+ self.controller.copy_to(dtbfile, "~/%s" % dtbfn)
+ self.controller.copy_to(self.rootfs, "~/test-rootfs.%s" % self.image_fstype)
for cmd in self.deploy_cmds:
- self.master.run(cmd)
+ self.controller.run(cmd)
def _start(self, params=None):
- self.power_cycle(self.master)
+ self.power_cycle(self.controller)
try:
serialconn = pexpect.spawn(self.serialcontrol_cmd, env=self.origenv, logfile=sys.stdout)
# We'd wait for "U-Boot" here but sometimes we connect too late on BeagleBone white to see it
diff --git a/meta-yocto-bsp/lib/oeqa/controllers/edgeroutertarget.py b/meta-yocto-bsp/lib/oeqa/controllers/edgeroutertarget.py
deleted file mode 100644
index 9c47b5b044..0000000000
--- a/meta-yocto-bsp/lib/oeqa/controllers/edgeroutertarget.py
+++ /dev/null
@@ -1,90 +0,0 @@
-# Copyright (C) 2014 Intel Corporation
-#
-# Released under the MIT license (see COPYING.MIT)
-
-# This module adds support to testimage.bbclass to deploy images and run
-# tests on a Ubiquiti Networks EdgeRouter Lite. The device must be set up
-# to boot into the master image already - the easiest way to do that is as
-# follows:
-#
-# 1. Take out the internal USB drive and plug it into your PC
-# 2. Repartition the USB drive so that you have three partitions in this
-# order:
-# 1: vfat, labelled "boot" (it will need to be formatted with mkfs.vfat
-# for this to be possible, since FAT partitions formatted under
-# DOS/Windows will only support uppercase labels)
-# 2: ext3 (for master image) labelled "testmaster"
-# 3: ext3 (for image under test) labelled "testrootfs"
-# 3. Copy the kernel to be used by the master image to the FAT partition
-# (it should be named "vmlinux.64" with the factory u-boot configuration)
-# 4. Install the master image onto the "testmaster" ext3 partition. If
-# you do this by just extracting the contents of an image onto the
-# partition, you will also likely need to create the master image marker
-# file /etc/masterimage within this partition so that we can tell when
-# we're booted into it that it is the master image.
-# 5. Put the USB drive back into the device, and ensure the console port
-# and first ethernet port are connected before powering on
-#
-# TEST_SERIALCONTROL_CMD will need to be set in local.conf so that we can
-# interact with u-boot over the serial console port.
-
-import os
-import bb
-import time
-import subprocess
-import sys
-import pexpect
-
-import oeqa.utils.sshcontrol as sshcontrol
-from oeqa.controllers.masterimage import MasterImageHardwareTarget
-
-
-class EdgeRouterTarget(MasterImageHardwareTarget):
-
- def __init__(self, d):
- super(EdgeRouterTarget, self).__init__(d)
-
- self.image_fstype = self.get_image_fstype(d)
- self.deploy_cmds = [
- 'mount -L boot /boot',
- 'mkdir -p /mnt/testrootfs',
- 'mount -L testrootfs /mnt/testrootfs',
- 'cp ~/test-kernel /boot',
- 'rm -rf /mnt/testrootfs/*',
- 'tar xvf ~/test-rootfs.%s -C /mnt/testrootfs' % self.image_fstype
- ]
- if not self.serialcontrol_cmd:
- bb.fatal("This TEST_TARGET needs a TEST_SERIALCONTROL_CMD defined in local.conf.")
-
-
- def _deploy(self):
- self.master.run("umount /mnt/testrootfs;")
- self.master.ignore_status = False
- self.master.copy_to(self.kernel, "~/test-kernel")
- self.master.copy_to(self.rootfs, "~/test-rootfs.%s" % self.image_fstype)
- for cmd in self.deploy_cmds:
- self.master.run(cmd)
-
- def _start(self, params=None):
- self.power_cycle(self.master)
- try:
- serialconn = pexpect.spawn(self.serialcontrol_cmd, env=self.origenv, logfile=sys.stdout)
- serialconn.expect("U-Boot")
- serialconn.sendline("a")
- serialconn.expect("Octeon ubnt_e100#")
- serialconn.sendline("fatload usb 0:1 $loadaddr test-kernel")
- serialconn.expect(" bytes read")
- serialconn.expect("Octeon ubnt_e100#")
- serialconn.sendline("bootoctlinux $loadaddr coremask=0x3 root=/dev/sda3 rw rootwait mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@3072k(eeprom)")
- serialconn.expect("login:", timeout=120)
- serialconn.close()
- except pexpect.ExceptionPexpect as e:
- bb.fatal('Serial interaction failed: %s' % str(e))
-
- def _wait_until_booted(self):
- try:
- serialconn = pexpect.spawn(self.serialcontrol_cmd, env=self.origenv, logfile=sys.stdout)
- serialconn.expect("login:", timeout=120)
- serialconn.close()
- except pexpect.ExceptionPexpect as e:
- 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
index 7bc807d2bc..c3a98979c5 100644
--- a/meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py
+++ b/meta-yocto-bsp/lib/oeqa/controllers/grubtarget.py
@@ -19,10 +19,9 @@ import subprocess
import sys
import pexpect
-import oeqa.utils.sshcontrol as sshcontrol
-from oeqa.controllers.masterimage import MasterImageHardwareTarget
+from oeqa.controllers.controllerimage import ControllerImageHardwareTarget
-class GrubTarget(MasterImageHardwareTarget):
+class GrubTarget(ControllerImageHardwareTarget):
def __init__(self, d):
super(GrubTarget, self).__init__(d)
@@ -41,16 +40,16 @@ class GrubTarget(MasterImageHardwareTarget):
def _deploy(self):
# make sure these aren't mounted
- self.master.run("umount /boot; umount /mnt/testrootfs;")
- self.master.ignore_status = False
+ self.controller.run("umount /boot; umount /mnt/testrootfs;")
+ self.controller.ignore_status = False
# Kernel files may not be in the image, so copy them just in case
- self.master.copy_to(self.rootfs, "~/test-rootfs." + self.image_fstype)
- self.master.copy_to(self.kernel, "~/test-kernel")
+ self.controller.copy_to(self.rootfs, "~/test-rootfs." + self.image_fstype)
+ self.controller.copy_to(self.kernel, "~/test-kernel")
for cmd in self.deploy_cmds:
- self.master.run(cmd)
+ self.controller.run(cmd)
def _start(self, params=None):
- self.power_cycle(self.master)
+ self.power_cycle(self.controller)
try:
serialconn = pexpect.spawn(self.serialcontrol_cmd, env=self.origenv, logfile=sys.stdout)
serialconn.expect("GNU GRUB version 2.00")
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
new file mode 100644
index 0000000000..b0d98418d1
--- /dev/null
+++ b/meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-beaglebone-yocto.txt
@@ -0,0 +1,4 @@
+# These should be reviewed to see if they are still needed
+l4_wkup_cm
+Failed to make EGL context current
+glamor initialization failed \ No newline at end of file
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
new file mode 100644
index 0000000000..9a655564cd
--- /dev/null
+++ b/meta-yocto-bsp/lib/oeqa/runtime/cases/parselogs-ignores-genericx86-64.txt
@@ -0,0 +1,7 @@
+# These should be reviewed to see if they are still needed
+Direct firmware load for i915
+Failed to load firmware i915
+Failed to fetch GuC
+Failed to initialize GuC
+Failed to load DMC firmware
+The 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
index 57599e19aa..6ce9a3b3f8 100644
--- a/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py
+++ b/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py
@@ -2,7 +2,7 @@ import os
from oeqa.selftest.case import OESelftestTestCase
from oeqa.core.decorator.depends import OETestDepends
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, runqemu
class Systemdboot(OESelftestTestCase):
@@ -21,8 +21,9 @@ class Systemdboot(OESelftestTestCase):
features += 'MACHINE = "genericx86-64"'
self.append_config(features)
- deploydir = get_bb_var('DEPLOY_DIR_IMAGE', "core-image-minimal")
- systemdbootfile = os.path.join(deploydir, 'systemd-bootx64.efi')
+ image = 'core-image-minimal'
+ bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'], image)
+ systemdbootfile = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], 'systemd-bootx64.efi')
# Ensure we're actually testing that this gets built and not that
# it was around from an earlier build
@@ -50,8 +51,8 @@ class Systemdboot(OESelftestTestCase):
AutomatedBy: Jose Perez Carranza <jose.perez.carranza at linux-intel.com>
"""
- systemdbootimage = os.path.join(deploydir, 'core-image-minimal-genericx86-64.wic')
- imagebootfile = os.path.join(deploydir, 'bootx64.efi')
+ systemdbootimage = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], '%s.wic' % bb_vars['IMAGE_LINK_NAME'])
+ imagebootfile = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], 'bootx64.efi')
# Clean environment before start the test
if os.path.isfile(imagebootfile):