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 <[email protected]>
---
 meta/classes-recipe/testimage.bbclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/classes-recipe/testimage.bbclass 
b/meta/classes-recipe/testimage.bbclass
index 844c0f19ad02..20f51e930103 100644
--- a/meta/classes-recipe/testimage.bbclass
+++ b/meta/classes-recipe/testimage.bbclass
@@ -413,6 +413,9 @@ def testimage_main(d):
         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():
         bb.error('%s - FAILED - also check the logs in %s' % (pn, 
d.getVar("LOG_DIR")), forcelog=True)
+        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))
 
 def get_runtime_paths(d):
     """

-- 
2.47.3

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#228592): 
https://lists.openembedded.org/g/openembedded-core/message/228592
Mute This Topic: https://lists.openembedded.org/mt/116981990/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to