summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/targetcontrol.py
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2015-08-24 19:04:02 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-30 12:36:12 +0100
commit85fd1a7a121daffc3c5c530930f832ecc61ef83d (patch)
treeee70ad65c0392775d8a4da174bd992e8e760c2e9 /meta/lib/oeqa/targetcontrol.py
parentd14ffaf6a366442bcf88e44ee3e105f9dea1e69c (diff)
downloadpoky-85fd1a7a121daffc3c5c530930f832ecc61ef83d.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] (From OE-Core rev: ad10af6be343b5425fde43055263b0744c161cb3) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/targetcontrol.py')
-rw-r--r--meta/lib/oeqa/targetcontrol.py6
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
14from oeqa.utils.sshcontrol import SSHControl 14from oeqa.utils.sshcontrol import SSHControl
15from oeqa.utils.qemurunner import QemuRunner 15from oeqa.utils.qemurunner import QemuRunner
16from oeqa.utils.qemutinyrunner import QemuTinyRunner 16from oeqa.utils.qemutinyrunner import QemuTinyRunner
17from oeqa.utils.dump import TargetDumper
17from oeqa.controllers.testtargetloader import TestTargetLoader 18from oeqa.controllers.testtargetloader import TestTargetLoader
18from abc import ABCMeta, abstractmethod 19from abc import ABCMeta, abstractmethod
19 20
@@ -123,9 +124,6 @@ class QemuTarget(BaseTarget):
123 self.origrootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype) 124 self.origrootfs = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + '.' + self.image_fstype)
124 self.rootfs = os.path.join(self.testdir, d.getVar("IMAGE_LINK_NAME", True) + '-testimage.' + self.image_fstype) 125 self.rootfs = os.path.join(self.testdir, d.getVar("IMAGE_LINK_NAME", True) + '-testimage.' + self.image_fstype)
125 self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin') 126 self.kernel = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("KERNEL_IMAGETYPE", False) + '-' + d.getVar('MACHINE', False) + '.bin')
126 self.dump_target = d.getVar("testimage_dump_target", True)
127 self.dump_host = d.getVar("testimage_dump_host", True)
128 self.dump_dir = d.getVar("TESTIMAGE_DUMP_DIR", True)
129 127
130 # Log QemuRunner log output to a file 128 # Log QemuRunner log output to a file
131 import oe.path 129 import oe.path
@@ -155,6 +153,8 @@ class QemuTarget(BaseTarget):
155 logfile = self.qemulog, 153 logfile = self.qemulog,
156 boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT", True))) 154 boottime = int(d.getVar("TEST_QEMUBOOT_TIMEOUT", True)))
157 155
156 self.target_dumper = TargetDumper(d, self.runner)
157
158 def deploy(self): 158 def deploy(self):
159 try: 159 try:
160 bb.utils.mkdirhier(self.testdir) 160 bb.utils.mkdirhier(self.testdir)