Skip to content

Minor update to tools - logging of tests and output #1926

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

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 0 additions & 2 deletions tools/build_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,6 @@ def build_library(src_paths, build_path, target, toolchain_name,
if toolchain_output:
cur_result["output"] += toolchain_output

cur_result["output"] += str(e)

add_result_to_report(report, cur_result)

# Let Exception propagate
Expand Down
13 changes: 7 additions & 6 deletions tools/toolchains/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,9 @@ def __init__(self, target, options=None, notify=None, macros=None, silent=False,

self.mp_pool = None

if 'UVISOR_PRESENT=1' in self.macros:
if 'UVISOR' in self.target.features and 'UVISOR_SUPPORTED' in self.target.extra_labels:
self.target.core = re.sub(r"F$", '', self.target.core)

self.flags = deepcopy(self.DEFAULT_FLAGS)

def get_output(self):
Expand All @@ -253,9 +254,12 @@ def print_notify(self, event, silent=False):
"""
msg = None

if event['type'] in ['info', 'debug']:
if not self.VERBOSE and event['type'] == 'tool_error':
msg = event['message']


elif event['type'] in ['info', 'debug']:
msg = event['message']

elif event['type'] == 'cc':
event['severity'] = event['severity'].title()
event['file'] = basename(event['file'])
Expand Down Expand Up @@ -775,9 +779,6 @@ def link_program(self, r, tmp_path, name):
def default_cmd(self, command):
self.debug("Command: %s"% ' '.join(command))
_stdout, _stderr, _rc = run_cmd(command)
# Print all warning / erros from stderr to console output
for error_line in _stderr.splitlines():
print error_line

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

Expand Down