summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-27 23:38:44 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-16 14:31:32 +0000
commit594679bb4810fb8a17c7ef16e3f6d7d177342e84 (patch)
tree60721943b8429231bd90c68834030346434eb6f0 /meta/lib
parent9cf4132158592e1500fbf50f9a8cc42d53ca60ea (diff)
downloadpoky-594679bb4810fb8a17c7ef16e3f6d7d177342e84.tar.gz
oeqa/utils/commands: Add extra qemu failure logging
Rather than just referring the user to the logs containing the failure, print them on the console. This aids debugging with oe-selftest with parallelisation as the logs may otherwise be lost. (From OE-Core rev: 36a018e245a232f520ff946f152cc875927a6fb4) (From OE-Core rev: 85b373f571cf2076d93e96db2aca295c53d3c16a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/utils/commands.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 0d9cf23fe4..933af92dce 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -333,7 +333,11 @@ def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None,
333 try: 333 try:
334 qemu.start(params=qemuparams, ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd, discard_writes=discard_writes) 334 qemu.start(params=qemuparams, ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd, discard_writes=discard_writes)
335 except bb.build.FuncFailed: 335 except bb.build.FuncFailed:
336 raise Exception('Failed to start QEMU - see the logs in %s' % logdir) 336 msg = 'Failed to start QEMU - see the logs in %s' % logdir
337 if os.path.exists(qemu.qemurunnerlog):
338 with open(qemu.qemurunnerlog, 'r') as f:
339 msg = msg + "Qemurunner log output from %s:\n%s" % (qemu.qemurunnerlog, f.read())
340 raise Exception(msg)
337 341
338 yield qemu 342 yield qemu
339 343