mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
oeqa: qemu: create missing directory for _write_dump
| Failed to dump QMP CMD: query-status with | Exception: [Errno 2] No such file or directory: '.../tmp/log/runtime-hostdump/qmp_00_query-status' | Failed to dump QMP CMD: query-block with | Exception: [Errno 2] No such file or directory: '.../tmp/log/runtime-hostdump/qmp_00_query-block' | Failed to dump QMP CMD: dump-guest-memory with | Exception: [Errno 2] No such file or directory: '.../tmp/log/runtime-hostdump/qmp_00_dump-guest-memory' The qmp dump commands could fail, because of missing root directory. So create it before any log writing. (From OE-Core rev: c4dc5d674afe65fedb5195f187b68f23720646ba) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
95870c10b1
commit
d6a126435f
@@ -66,6 +66,7 @@ class BaseDumper(object):
|
||||
|
||||
def _write_dump(self, command, output):
|
||||
fullname = self._construct_filename(command)
|
||||
os.makedirs(os.path.dirname(fullname), exist_ok=True)
|
||||
if isinstance(self, MonitorDumper):
|
||||
with open(fullname, 'w') as json_file:
|
||||
json.dump(output, json_file, indent=4)
|
||||
|
||||
Reference in New Issue
Block a user