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

login
register
mail settings
Submitter Stanacar, StefanX
Date Aug. 29, 2013, 5:51 p.m.
Message ID <1377798701-20612-1-git-send-email-stefanx.stanacar@intel.com>
Download mbox | patch
Permalink /patch/57053/
State Accepted
Commit 249dc825a006e465e9611f5f06e8a99882ed8ed1
Headers show

Comments

Stanacar, StefanX - Aug. 29, 2013, 5:51 p.m.
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 51588936d4a8cde3c9bb05800240c0a0f5dedf8d
changed the kill method and broke this code, so let's fix it.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
 meta/lib/oeqa/utils/qemurunner.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 6ee5b85..e7bd8b1 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -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()