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-30 00:02:22 +0100
commit5df4fb1fa108bd1cf8cfed098404d43160d30b98 (patch)
treec629d73e0e85de4f0d968f154c8e1a91443c02df /meta/classes/testimage.bbclass
parent1f66c623de8d4f708c9f7658e4626609660077c8 (diff)
downloadpoky-5df4fb1fa108bd1cf8cfed098404d43160d30b98.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: bdad1bdfec7fa86a6550f8aeb4e74029599df6d5) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1965b344abcff0ba584136f929b4a14645f1585e) Signed-off-by: Steve Sakoman <steve@sakoman.com> 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 c709384b91..db1d54e5cb 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -193,6 +193,7 @@ def testimage_main(d):
193 import json 193 import json
194 import signal 194 import signal
195 import logging 195 import logging
196 import shutil
196 197
197 from bb.utils import export_proxies 198 from bb.utils import export_proxies
198 from oeqa.core.utils.misc import updateTestData 199 from oeqa.core.utils.misc import updateTestData
@@ -397,10 +398,17 @@ def testimage_main(d):
397 get_testimage_result_id(configuration), 398 get_testimage_result_id(configuration),
398 dump_streams=d.getVar('TESTREPORT_FULLLOGS')) 399 dump_streams=d.getVar('TESTREPORT_FULLLOGS'))
399 results.logSummary(pn) 400 results.logSummary(pn)
401
402 # Copy additional logs to tmp/log/oeqa so it's easier to find them
403 targetdir = os.path.join(get_testimage_json_result_dir(d), d.getVar("PN"))
404 os.makedirs(targetdir, exist_ok=True)
405 os.symlink(bootlog, os.path.join(targetdir, os.path.basename(bootlog)))
406 os.symlink(d.getVar("BB_LOGFILE"), os.path.join(targetdir, os.path.basename(d.getVar("BB_LOGFILE") + "." + d.getVar('DATETIME'))))
407
400 if not results or not complete: 408 if not results or not complete:
401 bb.fatal('%s - FAILED - tests were interrupted during execution' % pn, forcelog=True) 409 bb.fatal('%s - FAILED - tests were interrupted during execution, check the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True)
402 if not results.wasSuccessful(): 410 if not results.wasSuccessful():
403 bb.fatal('%s - FAILED - check the task log and the ssh log' % pn, forcelog=True) 411 bb.fatal('%s - FAILED - also check the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True)
404 412
405def get_runtime_paths(d): 413def get_runtime_paths(d):
406 """ 414 """