1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00

oeqa/utils/dump: Move get_host_dumper to OERuntimeTestContextExecutor class

To avoid getVar calls inside a utils module, also moves
get_host_dumper import inside testexport isn't needed.

[YOCTO #10231]

(From OE-Core rev: f8beaf94e943a8b20d146be47a756af312ef107c)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Aníbal Limón
2016-12-05 11:43:21 -06:00
committed by Richard Purdie
parent 1247118870
commit 2d34b08533
4 changed files with 22 additions and 13 deletions
+2 -9
View File
@@ -5,12 +5,6 @@ import datetime
import itertools
from .commands import runCmd
def get_host_dumper(d):
cmds = d.getVar("testimage_dump_host")
parent_dir = d.getVar("TESTIMAGE_DUMP_DIR")
return HostDumper(cmds, parent_dir)
class BaseDumper(object):
""" Base class to dump commands from host/target """
@@ -77,13 +71,12 @@ class HostDumper(BaseDumper):
result = runCmd(cmd, ignore_status=True)
self._write_dump(cmd.split()[0], result.output)
class TargetDumper(BaseDumper):
""" Class to get dumps from target, it only works with QemuRunner """
def __init__(self, cmds, parent_dir, qemurunner):
def __init__(self, cmds, parent_dir, runner):
super(TargetDumper, self).__init__(cmds, parent_dir)
self.runner = qemurunner
self.runner = runner
def dump_target(self, dump_dir=""):
if dump_dir: