lib/oeqa/utils: qemurunner: fix when runqemu errors out

When qemu doesn't start or runqemu errors out
(some wrong option passed or sudo needs a password for setting tap) we
want to display the output but oe-core commit 9de7fe11967576f4a8b24e653c6b9a02e5f6d85b/
poky commit 51588936d4
changed the kill method and broke this code, so let's fix it.

(From OE-Core rev: 923d4bd548911caa0b419c10905895af1e8e7026)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Stefan Stanacar 2013-08-29 20:51:41 +03:00 committed by Richard Purdie
parent 8a90c8bdd4
commit 249dc825a0
1 changed files with 2 additions and 2 deletions

View File

@ -133,9 +133,9 @@ class QemuRunner:
return False
else:
bb.note("Qemu pid didn't appeared in %s seconds" % self.runqemutime)
output = self.runqemu.stdout
self.kill()
bb.note("Output from runqemu: %s " % self.runqemu.stdout.read())
self.runqemu.stdout.close()
bb.note("Output from runqemu:\n%s" % output.read())
return False
return self.is_alive()