Handling Exceptions better when building tests

Previously, when building tests with test.py, if an exception occurred, the
error message would be masked by the function 'build_tests'. This commit
handles NotSupportedExceptions and ToolExceptions, but lets all other
Exceptions propigate up to the caller function. In most cases, this is the
CLI scripts, which will print a traceback. This will allow us to better
debug the python tools if errors occur.
pull/2855/head
Brian Daniels 2016-09-28 13:49:44 -05:00
parent b481da44e9
commit cadcc80371
1 changed files with 8 additions and 8 deletions

View File

@ -2106,14 +2106,14 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
verbose=verbose,
app_config=app_config)
except Exception, e:
if not isinstance(e, NotSupportedException):
result = False
if continue_on_build_fail:
continue
else:
break
except NotSupportedException:
pass
except ToolException:
result = False
if continue_on_build_fail:
continue
else:
break
# If a clean build was carried out last time, disable it for the next build.
# Otherwise the previously built test will be deleted.