]> code.ossystems Code Review - openembedded-core.git/commitdiff
targetcontrol: Improve logs by outputting qemu boot log in case of failure
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Jul 2015 13:24:22 +0000 (13:24 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 27 Jul 2015 22:28:21 +0000 (23:28 +0100)
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@linuxfoundation.org>
meta/lib/oeqa/targetcontrol.py

index 138e61786bbd66ce85d44b3fc47036b2bcac1380..c76887bae1da2be6ae6615977d11886e3178f265 100644 (file)
@@ -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):