From: Richard Purdie Date: Mon, 27 Jul 2015 13:24:22 +0000 (+0000) Subject: targetcontrol: Improve logs by outputting qemu boot log in case of failure X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~29591 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5302b7b8fa1349ae99040fe8fdcc4e42c722cc10;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 --- diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py index 138e61786bb..c76887bae1d 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):