mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
1f66c623de
commit
5df4fb1fa1
@@ -193,6 +193,7 @@ def testimage_main(d):
|
|||||||
import json
|
import json
|
||||||
import signal
|
import signal
|
||||||
import logging
|
import logging
|
||||||
|
import shutil
|
||||||
|
|
||||||
from bb.utils import export_proxies
|
from bb.utils import export_proxies
|
||||||
from oeqa.core.utils.misc import updateTestData
|
from oeqa.core.utils.misc import updateTestData
|
||||||
@@ -397,10 +398,17 @@ def testimage_main(d):
|
|||||||
get_testimage_result_id(configuration),
|
get_testimage_result_id(configuration),
|
||||||
dump_streams=d.getVar('TESTREPORT_FULLLOGS'))
|
dump_streams=d.getVar('TESTREPORT_FULLLOGS'))
|
||||||
results.logSummary(pn)
|
results.logSummary(pn)
|
||||||
|
|
||||||
|
# Copy additional logs to tmp/log/oeqa so it's easier to find them
|
||||||
|
targetdir = os.path.join(get_testimage_json_result_dir(d), d.getVar("PN"))
|
||||||
|
os.makedirs(targetdir, exist_ok=True)
|
||||||
|
os.symlink(bootlog, os.path.join(targetdir, os.path.basename(bootlog)))
|
||||||
|
os.symlink(d.getVar("BB_LOGFILE"), os.path.join(targetdir, os.path.basename(d.getVar("BB_LOGFILE") + "." + d.getVar('DATETIME'))))
|
||||||
|
|
||||||
if not results or not complete:
|
if not results or not complete:
|
||||||
bb.fatal('%s - FAILED - tests were interrupted during execution' % pn, forcelog=True)
|
bb.fatal('%s - FAILED - tests were interrupted during execution, check the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True)
|
||||||
if not results.wasSuccessful():
|
if not results.wasSuccessful():
|
||||||
bb.fatal('%s - FAILED - check the task log and the ssh log' % pn, forcelog=True)
|
bb.fatal('%s - FAILED - also check the logs in %s' % (pn, d.getVar("LOG_DIR")), forcelog=True)
|
||||||
|
|
||||||
def get_runtime_paths(d):
|
def get_runtime_paths(d):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user