summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorSaul Wold <Saul.Wold@windriver.com>2020-09-28 14:23:12 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-30 15:01:51 +0100
commit406857b019f25e955a20ebd8fa71142b67258f84 (patch)
tree4f328930f493220cf9f214ffe5e5cf25de282a77 /meta/lib
parentab2ece14f040ea315fe1ec0a71d2e7401868a8ed (diff)
downloadpoky-406857b019f25e955a20ebd8fa71142b67258f84.tar.gz
testimage: Add testimage_dump_target to kwargs
This passes the list of commands to run on the OEQemuTarget when the TargetDumper needs to run in a test context due to a failure on the target. This is added here as a kwargs because the 'd' dictionary is not available in the staticmethod getTarget in the OERuntimeTestContextExecutor class. The OEQemuTarget is different from the QemuTarget which already uses the list of commands from testimage_dump_target from 'd'. The create_dir() is needed to initialize the TargetDumper's dump_dir variable. (From OE-Core rev: a63675fab4d9f638570912b15a07932f549cc4d1) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/core/target/qemu.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/target/qemu.py b/meta/lib/oeqa/core/target/qemu.py
index 295e8765e9..0f29414df5 100644
--- a/meta/lib/oeqa/core/target/qemu.py
+++ b/meta/lib/oeqa/core/target/qemu.py
@@ -12,6 +12,7 @@ from collections import defaultdict
12 12
13from .ssh import OESSHTarget 13from .ssh import OESSHTarget
14from oeqa.utils.qemurunner import QemuRunner 14from oeqa.utils.qemurunner import QemuRunner
15from oeqa.utils.dump import TargetDumper
15 16
16supported_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic'] 17supported_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic']
17 18
@@ -42,6 +43,9 @@ class OEQemuTarget(OESSHTarget):
42 dump_host_cmds=dump_host_cmds, logger=logger, 43 dump_host_cmds=dump_host_cmds, logger=logger,
43 serial_ports=serial_ports, boot_patterns = boot_patterns, 44 serial_ports=serial_ports, boot_patterns = boot_patterns,
44 use_ovmf=ovmf) 45 use_ovmf=ovmf)
46 dump_target_cmds = kwargs.get("testimage_dump_target")
47 self.target_dumper = TargetDumper(dump_target_cmds, dump_dir, self.runner)
48 self.target_dumper.create_dir("qemu")
45 49
46 def start(self, params=None, extra_bootparams=None, runqemuparams=''): 50 def start(self, params=None, extra_bootparams=None, runqemuparams=''):
47 if self.use_slirp and not self.server_ip: 51 if self.use_slirp and not self.server_ip: