summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrej Valek <andrej.valek@siemens.com>2022-01-28 10:34:46 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-03 09:05:13 +0000
commitd6a126435f4f312e0824d0e991b2667c094b9f3c (patch)
tree965c5f6601ff6edde230f64e6fdda353e9378231
parent95870c10b1b791a56045f593314bfc49d384eae7 (diff)
downloadpoky-d6a126435f4f312e0824d0e991b2667c094b9f3c.tar.gz
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>
-rw-r--r--meta/lib/oeqa/utils/dump.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/dump.py b/meta/lib/oeqa/utils/dump.py
index dc8757807e..95a79a571c 100644
--- a/meta/lib/oeqa/utils/dump.py
+++ b/meta/lib/oeqa/utils/dump.py
@@ -66,6 +66,7 @@ class BaseDumper(object):
66 66
67 def _write_dump(self, command, output): 67 def _write_dump(self, command, output):
68 fullname = self._construct_filename(command) 68 fullname = self._construct_filename(command)
69 os.makedirs(os.path.dirname(fullname), exist_ok=True)
69 if isinstance(self, MonitorDumper): 70 if isinstance(self, MonitorDumper):
70 with open(fullname, 'w') as json_file: 71 with open(fullname, 'w') as json_file:
71 json.dump(output, json_file, indent=4) 72 json.dump(output, json_file, indent=4)