[oe-commits] Richard Purdie : targetcontrol: Improve logs by outputting qemu boot log in case of failure

git at git.openembedded.org git at git.openembedded.org
Mon Jul 27 13:26:46 UTC 2015


Module: openembedded-core.git
Branch: master-next
Commit: 6601c46cfeffdcc16d4a30e76e34bdacfb1f56ef
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=6601c46cfeffdcc16d4a30e76e34bdacfb1f56ef

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Mon Jul 27 13:24:22 2015 +0000

targetcontrol: Improve logs by outputting qemu boot log in case of failure

We've had a few cases on the autobuilder where we've lost logs of
the boot and been unable to debug it further. Show this information
onto the console to be more useful.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/lib/oeqa/targetcontrol.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 138e6178..c76887b 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -175,6 +175,9 @@ class QemuTarget(BaseTarget):
             self.connection = SSHControl(ip=self.ip, logfile=self.sshlog)
         else:
             self.stop()
+            if os.path.exists(self.qemulog):
+                with open(self.qemulog, 'r') as f:
+                    bb.error("Qemu log output from %s:\n%s" % (self.qemulog, f.read()))
             raise bb.build.FuncFailed("%s - FAILED to start qemu - check the task log and the boot log" % self.pn)
 
     def stop(self):



More information about the Openembedded-commits mailing list