diff options
author | Saul Wold <Saul.Wold@windriver.com> | 2020-09-28 14:23:12 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-30 15:01:51 +0100 |
commit | 406857b019f25e955a20ebd8fa71142b67258f84 (patch) | |
tree | 4f328930f493220cf9f214ffe5e5cf25de282a77 | |
parent | ab2ece14f040ea315fe1ec0a71d2e7401868a8ed (diff) | |
download | poky-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>
-rw-r--r-- | meta/classes/testimage.bbclass | 1 | ||||
-rw-r--r-- | meta/lib/oeqa/core/target/qemu.py | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index 6c8bedcd65..e3feef02f8 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass | |||
@@ -319,6 +319,7 @@ def testimage_main(d): | |||
319 | target_kwargs['powercontrol_extra_args'] = d.getVar("TEST_POWERCONTROL_EXTRA_ARGS") or "" | 319 | target_kwargs['powercontrol_extra_args'] = d.getVar("TEST_POWERCONTROL_EXTRA_ARGS") or "" |
320 | target_kwargs['serialcontrol_cmd'] = d.getVar("TEST_SERIALCONTROL_CMD") or None | 320 | target_kwargs['serialcontrol_cmd'] = d.getVar("TEST_SERIALCONTROL_CMD") or None |
321 | target_kwargs['serialcontrol_extra_args'] = d.getVar("TEST_SERIALCONTROL_EXTRA_ARGS") or "" | 321 | target_kwargs['serialcontrol_extra_args'] = d.getVar("TEST_SERIALCONTROL_EXTRA_ARGS") or "" |
322 | target_kwargs['testimage_dump_target'] = d.getVar("testimage_dump_target") or "" | ||
322 | 323 | ||
323 | def export_ssh_agent(d): | 324 | def export_ssh_agent(d): |
324 | import os | 325 | import os |
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 | ||
13 | from .ssh import OESSHTarget | 13 | from .ssh import OESSHTarget |
14 | from oeqa.utils.qemurunner import QemuRunner | 14 | from oeqa.utils.qemurunner import QemuRunner |
15 | from oeqa.utils.dump import TargetDumper | ||
15 | 16 | ||
16 | supported_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic'] | 17 | supported_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: |