From f8beaf94e943a8b20d146be47a756af312ef107c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= Date: Mon, 5 Dec 2016 11:43:21 -0600 Subject: oeqa/utils/dump: Move get_host_dumper to OERuntimeTestContextExecutor class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To avoid getVar calls inside a utils module, also moves get_host_dumper import inside testexport isn't needed. [YOCTO #10231] Signed-off-by: Aníbal Limón --- meta/lib/oeqa/utils/dump.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'meta/lib/oeqa/utils') diff --git a/meta/lib/oeqa/utils/dump.py b/meta/lib/oeqa/utils/dump.py index 44037a989d..5a7edc1a86 100644 --- a/meta/lib/oeqa/utils/dump.py +++ b/meta/lib/oeqa/utils/dump.py @@ -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: -- cgit v1.2.3