mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 00:59:48 +00:00
dump: Created new classes for dump host and target
It makes sense to separate the dump commands from the
oeRuntimeTest class, this way it can be used in all
the test context.
These are the changes included in this patch:
- Created classes: BaseDumper, HostDumper, TargetDumper
- Create an instance of HostDumper in imagetest.bbclass
and add it to TestContext class, this way any class
that have access to the TestContext would be able
to dump logs from the host
- Create an instance of TargetDumper in QemuTarget
class after get the runner, this way it is
accessible during the tests.
[YOCTO #8118]
(From OE-Core rev: ad10af6be343b5425fde43055263b0744c161cb3)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d14ffaf6a3
commit
85fd1a7a12
@@ -14,6 +14,7 @@ import logging
|
||||
from oeqa.utils.sshcontrol import SSHControl
|
||||
from oeqa.utils.qemurunner import QemuRunner
|
||||
from oeqa.utils.qemutinyrunner import QemuTinyRunner
|
||||
from oeqa.utils.dump import TargetDumper
|
||||
from oeqa.controllers.testtargetloader import TestTargetLoader
|
||||
from abc import ABCMeta, abstractmethod
|
||||
|
||||
@@ -123,9 +124,6 @@ class QemuTarget(BaseTarget):
|
||||
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.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin')
|
||||
self.dump_target = d.getVar("testimage_dump_target", True)
|
||||
self.dump_host = d.getVar("testimage_dump_host", True)
|
||||
self.dump_dir = d.getVar("TESTIMAGE_DUMP_DIR", True)
|
||||
|
||||
# Log QemuRunner log output to a file
|
||||
import oe.path
|
||||
@@ -155,6 +153,8 @@ class QemuTarget(BaseTarget):
|
||||
logfile = self.qemulog,
|
||||
boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT", True)))
|
||||
|
||||
self.target_dumper = TargetDumper(d, self.runner)
|
||||
|
||||
def deploy(self):
|
||||
try:
|
||||
bb.utils.mkdirhier(self.testdir)
|
||||
|
||||
Reference in New Issue
Block a user