mirror of
https://git.yoctoproject.org/poky
synced 2026-10-22 19:18:18 +00:00
testimage: avoid symlinking missing qemu boot log
When qemu test runs only produce suffixed bootlog variants, the base bootlog path may not exist. os.symlink() creates a dangling symlink in the oeqa result log directory. Avoid advertising a boot log in the collected test results when that path does not exist. Guard the symlink creation and log a note instead. This is a partial backport of master commit 7a6596925cb0eb8dd48a0362a51875cdd60152bc. Only the symlink guard is picked here; the bootlog variant globbing from master is not applicable to scarthgap. (From OE-Core rev: 6672769e251ab0dd42fc5f5cde99800ed5ba8289) Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com> Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Paul Barker <paul@pbarker.dev>
This commit is contained in:
1 parent
1d25c3749c
commit
1f97950ed7
1 file changed
+4
-1
@@ -395,7 +395,10 @@ def testimage_main(d):
|
||||
# Copy additional logs to tmp/log/oeqa so it's easier to find them
|
||||
targetdir = os.path.join(get_json_result_dir(d), d.getVar("PN"))
|
||||
os.makedirs(targetdir, exist_ok=True)
|
||||
os.symlink(bootlog, os.path.join(targetdir, os.path.basename(bootlog)))
|
||||
if os.path.exists(bootlog):
|
||||
os.symlink(bootlog, os.path.join(targetdir, os.path.basename(bootlog)))
|
||||
else:
|
||||
bb.note("testimage: boot log not found at %s" % 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:
|
||||
|
||||
Reference in new issue
Block a user