Skip to content

test: fix stats depth variable scope #4933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 14 additions & 17 deletions tools/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
clean_mbed_libs_options = True if self.opts_goanna_for_mbed_sdk or clean or self.opts_clean else None

profile = extract_profile(self.opts_parser, self.opts, toolchain)
stats_depth = self.opts.stats_depth or 2


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

project_name = self.opts_firmware_global_name if self.opts_firmware_global_name else None
try:
path = build_project(test.source_dir,
join(build_dir, test_id),
T,
toolchain,
test.dependencies,
clean=clean_project_options,
verbose=self.opts_verbose,
name=project_name,
macros=MACROS,
inc_dirs=INC_DIRS,
jobs=self.opts_jobs,
report=build_report,
properties=build_properties,
project_id=test_id,
project_description=test.get_description(),
build_profile=profile,
stats_depth=stats_depth)
path = build_project(test.source_dir, join(build_dir, test_id), T,
toolchain, test.dependencies, clean=clean_project_options,
verbose=self.opts_verbose, name=project_name, macros=MACROS,
inc_dirs=INC_DIRS, jobs=self.opts_jobs, report=build_report,
properties=build_properties, project_id=test_id,
project_description=test.get_description(),
build_profile=profile, stats_depth=stats_depth)

except Exception, e:
project_name_str = project_name if project_name is not None else test_id
Expand Down Expand Up @@ -1988,6 +1979,12 @@ def get_default_test_options_parser():
default=False,
action="store_true",
help='Prints script version and exits')

parser.add_argument('--stats-depth',
dest='stats_depth',
default=2,
type=int,
help="Depth level for static memory report")
return parser

def test_path_to_name(path, base):
Expand Down