Skip to content

build: fix notifier typo and passing to builds API #6914

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 2 commits into from
Jun 5, 2018
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
skipped.append(tt_id)
else:
try:
notify = TerminalNotifer(options.verbose, options.silent)
notifier = TerminalNotifier(options.verbose, options.silent)
mcu = TARGET_MAP[target]
profile = extract_profile(parser, options, toolchain)
if options.source_dir:
Expand All @@ -197,6 +197,7 @@
name=options.artifact_name,
build_profile=profile,
ignore=options.ignore,
notify = notifier,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces should be removed.

)
else:
lib_build_res = build_mbed_libs(
Expand All @@ -206,6 +207,7 @@
macros=options.macros,
build_profile=profile,
ignore=options.ignore,
notify=notifier,
)

for lib_id in libraries:
Expand Down
4 changes: 1 addition & 3 deletions tools/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
build_mbed_libs_result = build_mbed_libs(
T, toolchain,
clean=clean_mbed_libs_options,
verbose=self.opts_verbose,
jobs=self.opts_jobs,
report=build_report,
properties=build_properties,
Expand Down Expand Up @@ -463,7 +462,6 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
build_lib(lib_id,
T,
toolchain,
verbose=self.opts_verbose,
clean=clean_mbed_libs_options,
jobs=self.opts_jobs,
report=build_report,
Expand Down Expand Up @@ -509,7 +507,7 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
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,
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(),
Expand Down
6 changes: 3 additions & 3 deletions tools/toolchains/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ def _add_file(self, file_path, resources, base_path, exclude_paths=None):

elif ext == self.LINKER_EXT:
if resources.linker_script is not None:
self.info("Warning: Multiple linker scripts detected: %s -> %s" % (resources.linker_script, file_path))
self.notify.info("Warning: Multiple linker scripts detected: %s -> %s" % (resources.linker_script, file_path))
resources.linker_script = file_path

elif ext == '.lib':
Expand Down Expand Up @@ -1085,7 +1085,7 @@ def build_library(self, objects, dir, name):
lib = self.STD_LIB_NAME % name
fout = join(dir, lib)
if self.need_update(fout, objects):
self.info("Library: %s" % lib)
self.notify.info("Library: %s" % lib)
self.archive(objects, fout)
needed_update = True

Expand Down Expand Up @@ -1175,7 +1175,7 @@ def mem_stats(self, map):

# Parse and decode a map file
if memap.parse(abspath(map), toolchain) is False:
self.info("Unknown toolchain for memory statistics %s" % toolchain)
self.notify.info("Unknown toolchain for memory statistics %s" % toolchain)
return None

# Store the memap instance for later use
Expand Down