Skip to content

Commit b99e6b5

Browse files
0xc0170theotherjimmy
authored andcommitted
Pass stats depth to singletest correctly
Fixes #4930
1 parent 2dc4bef commit b99e6b5

File tree

1 file changed

+14
-17
lines changed

1 file changed

+14
-17
lines changed

tools/test_api.py

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
365365
clean_mbed_libs_options = True if self.opts_goanna_for_mbed_sdk or clean or self.opts_clean else None
366366

367367
profile = extract_profile(self.opts_parser, self.opts, toolchain)
368+
stats_depth = self.opts.stats_depth or 2
368369

369370

370371
try:
@@ -481,23 +482,13 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
481482

482483
project_name = self.opts_firmware_global_name if self.opts_firmware_global_name else None
483484
try:
484-
path = build_project(test.source_dir,
485-
join(build_dir, test_id),
486-
T,
487-
toolchain,
488-
test.dependencies,
489-
clean=clean_project_options,
490-
verbose=self.opts_verbose,
491-
name=project_name,
492-
macros=MACROS,
493-
inc_dirs=INC_DIRS,
494-
jobs=self.opts_jobs,
495-
report=build_report,
496-
properties=build_properties,
497-
project_id=test_id,
498-
project_description=test.get_description(),
499-
build_profile=profile,
500-
stats_depth=stats_depth)
485+
path = build_project(test.source_dir, join(build_dir, test_id), T,
486+
toolchain, test.dependencies, clean=clean_project_options,
487+
verbose=self.opts_verbose, name=project_name, macros=MACROS,
488+
inc_dirs=INC_DIRS, jobs=self.opts_jobs, report=build_report,
489+
properties=build_properties, project_id=test_id,
490+
project_description=test.get_description(),
491+
build_profile=profile, stats_depth=stats_depth)
501492

502493
except Exception, e:
503494
project_name_str = project_name if project_name is not None else test_id
@@ -1988,6 +1979,12 @@ def get_default_test_options_parser():
19881979
default=False,
19891980
action="store_true",
19901981
help='Prints script version and exits')
1982+
1983+
parser.add_argument('--stats-depth',
1984+
dest='stats_depth',
1985+
default=2,
1986+
type=int,
1987+
help="Depth level for static memory report")
19911988
return parser
19921989

19931990
def test_path_to_name(path, base):

0 commit comments

Comments
 (0)