diff options
author | Mariano Lopez <mariano.lopez@linux.intel.com> | 2015-08-24 19:04:02 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-30 12:34:40 +0100 |
commit | ad10af6be343b5425fde43055263b0744c161cb3 (patch) | |
tree | 0b1dd2981e31d5704e8fb2d3abefa5124bf4dba0 /meta/lib/oeqa/targetcontrol.py | |
parent | 6ca7f5c0d0f024ae5d21368188e3428534cab2a4 (diff) | |
download | openembedded-core-contrib-ad10af6be343b5425fde43055263b0744c161cb3.tar.gz |
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]
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Diffstat (limited to 'meta/lib/oeqa/targetcontrol.py')
-rw-r--r-- | meta/lib/oeqa/targetcontrol.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py index 59cae2eff1..2d58f17ddb 100644 --- a/meta/lib/oeqa/targetcontrol.py +++ b/meta/lib/oeqa/targetcontrol.py @@ -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) |