Testimage test fails are often a consequence of issues inside of the
virtual machine, such as the OOM killer firing. Showing the last kernel
log lines on the main log output should help to debug these fails.
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
if not results or not complete:
bb.error('%s - FAILED - tests were interrupted during execution, check the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True)
if results and not results.wasSuccessful():
+ with open(bootlog, 'r') as bootlogfile:
+ bootlines = "".join(bootlogfile.readlines()[-20:])
+ bb.plain('%s - FAILED - Last lines of QEMU boot log:\n%s' % (pn, bootlines))
bb.error('%s - FAILED - also check the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True)
def get_runtime_paths(d):