mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
oeqa/targetcontrol: Add support for poky-tiny in QemuTarget.
(From OE-Core rev: 8f1a52a3f72506911154769e6ad4a44f32c3112e) Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
bcd9f0578f
commit
fa5970e0d9
@@ -12,6 +12,7 @@ import traceback
|
|||||||
import sys
|
import sys
|
||||||
from oeqa.utils.sshcontrol import SSHControl
|
from oeqa.utils.sshcontrol import SSHControl
|
||||||
from oeqa.utils.qemurunner import QemuRunner
|
from oeqa.utils.qemurunner import QemuRunner
|
||||||
|
from oeqa.utils.qemutinyrunner import QemuTinyRunner
|
||||||
from oeqa.controllers.testtargetloader import TestTargetLoader
|
from oeqa.controllers.testtargetloader import TestTargetLoader
|
||||||
from abc import ABCMeta, abstractmethod
|
from abc import ABCMeta, abstractmethod
|
||||||
|
|
||||||
@@ -110,7 +111,7 @@ class BaseTarget(object):
|
|||||||
|
|
||||||
class QemuTarget(BaseTarget):
|
class QemuTarget(BaseTarget):
|
||||||
|
|
||||||
supported_image_fstypes = ['ext3', 'ext4']
|
supported_image_fstypes = ['ext3', 'ext4', 'cpio.gz']
|
||||||
|
|
||||||
def __init__(self, d):
|
def __init__(self, d):
|
||||||
|
|
||||||
@@ -120,14 +121,25 @@ class QemuTarget(BaseTarget):
|
|||||||
self.qemulog = os.path.join(self.testdir, "qemu_boot_log.%s" % self.datetime)
|
self.qemulog = os.path.join(self.testdir, "qemu_boot_log.%s" % self.datetime)
|
||||||
self.origrootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype)
|
self.origrootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype)
|
||||||
self.rootfs = os.path.join(self.testdir, d.getVar("IMAGE_LINK_NAME", True) + '-testimage.' + self.image_fstype)
|
self.rootfs = os.path.join(self.testdir, d.getVar("IMAGE_LINK_NAME", True) + '-testimage.' + self.image_fstype)
|
||||||
|
self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE") + '-' + d.getVar('MACHINE') + '.bin')
|
||||||
|
|
||||||
self.runner = QemuRunner(machine=d.getVar("MACHINE", True),
|
if d.getVar("DISTRO", True) == "poky-tiny":
|
||||||
rootfs=self.rootfs,
|
self.runner = QemuTinyRunner(machine=d.getVar("MACHINE", True),
|
||||||
tmpdir = d.getVar("TMPDIR", True),
|
rootfs=self.rootfs,
|
||||||
deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE", True),
|
tmpdir = d.getVar("TMPDIR", True),
|
||||||
display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY", True),
|
deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE", True),
|
||||||
logfile = self.qemulog,
|
display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY", True),
|
||||||
boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT", True)))
|
logfile = self.qemulog,
|
||||||
|
kernel = self.kernel,
|
||||||
|
boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT", True)))
|
||||||
|
else:
|
||||||
|
self.runner = QemuRunner(machine=d.getVar("MACHINE", True),
|
||||||
|
rootfs=self.rootfs,
|
||||||
|
tmpdir = d.getVar("TMPDIR", True),
|
||||||
|
deploy_dir_image = d.getVar("DEPLOY_DIR_IMAGE", True),
|
||||||
|
display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY", True),
|
||||||
|
logfile = self.qemulog,
|
||||||
|
boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT", True)))
|
||||||
|
|
||||||
def deploy(self):
|
def deploy(self):
|
||||||
try:
|
try:
|
||||||
@@ -167,6 +179,9 @@ class QemuTarget(BaseTarget):
|
|||||||
else:
|
else:
|
||||||
raise bb.build.FuncFailed("%s - FAILED to re-start qemu - check the task log and the boot log" % self.pn)
|
raise bb.build.FuncFailed("%s - FAILED to re-start qemu - check the task log and the boot log" % self.pn)
|
||||||
|
|
||||||
|
def run_serial(self, command):
|
||||||
|
return self.runner.run_serial(command)
|
||||||
|
|
||||||
|
|
||||||
class SimpleRemoteTarget(BaseTarget):
|
class SimpleRemoteTarget(BaseTarget):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user