summaryrefslogtreecommitdiffstats
path: root/meta/classes/testimage.bbclass
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-09-19 18:54:16 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-21 23:44:08 +0100
commitb0bcf539e963baea0a74b0958412e409d326c853 (patch)
treead127a9ffd3ee449dbe1d9c0f3a9ac644701577b /meta/classes/testimage.bbclass
parentc4fa4f9735b66d706c4545e6b37ba3fb3aaf296e (diff)
downloadpoky-b0bcf539e963baea0a74b0958412e409d326c853.tar.gz
testimage: symlink the task log and qemu console log to tmp/log/oeqa
This makes it easier for the AB scripts (particularly, collect-results) to access and archive these items, as they can contain useful information when ptests or other qemu tests fail (and also if they don't fail). [YOCTO #14518] (From OE-Core rev: 1965b344abcff0ba584136f929b4a14645f1585e) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/testimage.bbclass')
-rw-r--r--meta/classes/testimage.bbclass12
1 files changed, 10 insertions, 2 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 3c689aec91..8fd04c99e7 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -201,6 +201,7 @@ def testimage_main(d):
201 import json 201 import json
202 import signal 202 import signal
203 import logging 203 import logging
204 import shutil
204 205
205 from bb.utils import export_proxies 206 from bb.utils import export_proxies
206 from oeqa.core.utils.misc import updateTestData 207 from oeqa.core.utils.misc import updateTestData
@@ -408,10 +409,17 @@ def testimage_main(d):
408 get_testimage_result_id(configuration), 409 get_testimage_result_id(configuration),
409 dump_streams=d.getVar('TESTREPORT_FULLLOGS')) 410 dump_streams=d.getVar('TESTREPORT_FULLLOGS'))
410 results.logSummary(pn) 411 results.logSummary(pn)
412
413 # Copy additional logs to tmp/log/oeqa so it's easier to find them
414 targetdir = os.path.join(get_testimage_json_result_dir(d), d.getVar("PN"))
415 os.makedirs(targetdir, exist_ok=True)
416 os.symlink(bootlog, os.path.join(targetdir, os.path.basename(bootlog)))
417 os.symlink(d.getVar("BB_LOGFILE"), os.path.join(targetdir, os.path.basename(d.getVar("BB_LOGFILE") + "." + d.getVar('DATETIME'))))
418
411 if not results or not complete: 419 if not results or not complete:
412 bb.fatal('%s - FAILED - tests were interrupted during execution' % pn, forcelog=True) 420 bb.fatal('%s - FAILED - tests were interrupted during execution, check the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True)
413 if not results.wasSuccessful(): 421 if not results.wasSuccessful():
414 bb.fatal('%s - FAILED - check the task log and the ssh log' % pn, forcelog=True) 422 bb.fatal('%s - FAILED - also check the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True)
415 423
416def get_runtime_paths(d): 424def get_runtime_paths(d):
417 """ 425 """