Skip to content

Commit a033ba6

Browse files
PerMacnashif
authored andcommitted
twister: Add warning to the "-footprint-from-buildlog" flag
The flag won't work with sysbuild since there is no way to reliably tell to a parser which data came from which image. fixes: #74092 Signed-off-by: Maciej Perkowski <[email protected]>
1 parent d83a649 commit a033ba6

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

scripts/pylib/twister/twisterlib/environment.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,8 @@ def add_parse_arguments(parser = None):
413413
action = "store_true",
414414
help="Take ROM/RAM sections footprint summary values from the 'build.log' "
415415
"instead of 'objdump' results used otherwise."
416-
"Requires --enable-size-report or one of the baseline comparison modes.")
416+
"Requires --enable-size-report or one of the baseline comparison modes."
417+
"Warning: the feature will not work correctly with sysbuild.")
417418

418419
compare_group_option = footprint_group.add_mutually_exclusive_group()
419420

@@ -862,9 +863,13 @@ def parse_arguments(parser, args, options = None, on_init=True):
862863
sc.size_report()
863864
sys.exit(0)
864865

865-
if options.footprint_from_buildlog and not options.enable_size_report:
866-
logger.error("--footprint-from-buildlog requires --enable-size-report")
867-
sys.exit(1)
866+
if options.footprint_from_buildlog:
867+
logger.warning("WARNING: Using --footprint-from-buildlog will give inconsistent results "
868+
"for configurations using sysbuild. It is recommended to not use this flag "
869+
"when building configurations using sysbuild.")
870+
if not options.enable_size_report:
871+
logger.error("--footprint-from-buildlog requires --enable-size-report")
872+
sys.exit(1)
868873

869874
if len(options.extra_test_args) > 0:
870875
# extra_test_args is a list of CLI args that Twister did not recognize

0 commit comments

Comments
 (0)