Skip to content

Commit dcff9b1

Browse files
committed
Minor update to tools - logging of tests and output
1 parent e9b5601 commit dcff9b1

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

tools/build_api.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,6 @@ def build_library(src_paths, build_path, target, toolchain_name,
383383
if toolchain_output:
384384
cur_result["output"] += toolchain_output
385385

386-
cur_result["output"] += str(e)
387-
388386
add_result_to_report(report, cur_result)
389387

390388
# Let Exception propagate

tools/toolchains/__init__.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,9 @@ def __init__(self, target, options=None, notify=None, macros=None, silent=False,
241241

242242
self.mp_pool = None
243243

244-
if 'UVISOR_PRESENT=1' in self.macros:
244+
if 'UVISOR' in self.target.features and 'UVISOR_SUPPORTED' in self.target.extra_labels:
245245
self.target.core = re.sub(r"F$", '', self.target.core)
246+
246247
self.flags = deepcopy(self.DEFAULT_FLAGS)
247248

248249
def get_output(self):
@@ -253,9 +254,12 @@ def print_notify(self, event, silent=False):
253254
"""
254255
msg = None
255256

256-
if event['type'] in ['info', 'debug']:
257+
if not self.VERBOSE and event['type'] == 'tool_error':
257258
msg = event['message']
258-
259+
260+
elif event['type'] in ['info', 'debug']:
261+
msg = event['message']
262+
259263
elif event['type'] == 'cc':
260264
event['severity'] = event['severity'].title()
261265
event['file'] = basename(event['file'])
@@ -775,9 +779,6 @@ def link_program(self, r, tmp_path, name):
775779
def default_cmd(self, command):
776780
self.debug("Command: %s"% ' '.join(command))
777781
_stdout, _stderr, _rc = run_cmd(command)
778-
# Print all warning / erros from stderr to console output
779-
for error_line in _stderr.splitlines():
780-
print error_line
781782

782783
self.debug("Return: %s"% _rc)
783784

0 commit comments

Comments
 (0)