Minor update to tools - logging of tests and output

pull/1926/head
Mihail Stoyanov 2016-06-14 01:57:01 +01:00
parent e9b56018d2
commit dcff9b15e7
2 changed files with 7 additions and 8 deletions

View File

@ -383,8 +383,6 @@ def build_library(src_paths, build_path, target, toolchain_name,
if toolchain_output: if toolchain_output:
cur_result["output"] += toolchain_output cur_result["output"] += toolchain_output
cur_result["output"] += str(e)
add_result_to_report(report, cur_result) add_result_to_report(report, cur_result)
# Let Exception propagate # Let Exception propagate

View File

@ -241,8 +241,9 @@ class mbedToolchain:
self.mp_pool = None 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.target.core = re.sub(r"F$", '', self.target.core)
self.flags = deepcopy(self.DEFAULT_FLAGS) self.flags = deepcopy(self.DEFAULT_FLAGS)
def get_output(self): def get_output(self):
@ -253,9 +254,12 @@ class mbedToolchain:
""" """
msg = None msg = None
if event['type'] in ['info', 'debug']: if not self.VERBOSE and event['type'] == 'tool_error':
msg = event['message'] msg = event['message']
elif event['type'] in ['info', 'debug']:
msg = event['message']
elif event['type'] == 'cc': elif event['type'] == 'cc':
event['severity'] = event['severity'].title() event['severity'] = event['severity'].title()
event['file'] = basename(event['file']) event['file'] = basename(event['file'])
@ -775,9 +779,6 @@ class mbedToolchain:
def default_cmd(self, command): def default_cmd(self, command):
self.debug("Command: %s"% ' '.join(command)) self.debug("Command: %s"% ' '.join(command))
_stdout, _stderr, _rc = run_cmd(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) self.debug("Return: %s"% _rc)