diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-27 23:38:44 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-12-06 10:17:25 +0000 |
commit | 85b373f571cf2076d93e96db2aca295c53d3c16a (patch) | |
tree | 18c753fe886ace32d96f482aa3d9d851a6784a3e | |
parent | 8a9fa1597245d13db89361c40db7867786f137ff (diff) | |
download | openembedded-core-85b373f571cf2076d93e96db2aca295c53d3c16a.tar.gz openembedded-core-85b373f571cf2076d93e96db2aca295c53d3c16a.tar.bz2 openembedded-core-85b373f571cf2076d93e96db2aca295c53d3c16a.zip |
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)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/utils/commands.py | 6 |
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, try: qemu.start(params=qemuparams, ssh=ssh, runqemuparams=runqemuparams, launch_cmd=launch_cmd, discard_writes=discard_writes) except bb.build.FuncFailed: - raise Exception('Failed to start QEMU - see the logs in %s' % logdir) + msg = 'Failed to start QEMU - see the logs in %s' % logdir + if os.path.exists(qemu.qemurunnerlog): + with open(qemu.qemurunnerlog, 'r') as f: + msg = msg + "Qemurunner log output from %s:\n%s" % (qemu.qemurunnerlog, f.read()) + raise Exception(msg) yield qemu |