mirror of https://github.com/ARMmbed/mbed-os.git
Allowing test builds to continue if one test build fails
This ensures that a build report is produced, even if a build fails. This allows you to see what went wrong later.
parent
c71e81b371
commit
7a627b3fdd
|
@ -306,7 +306,12 @@ def build_library(src_paths, build_path, target, toolchain_name,
|
|||
except Exception, e:
|
||||
if report != None:
|
||||
end = time()
|
||||
cur_result["result"] = "FAIL"
|
||||
|
||||
if isinstance(e, ToolException):
|
||||
cur_result["result"] = "FAIL"
|
||||
elif isinstance(e, NotSupportedException):
|
||||
cur_result["result"] = "NOT_SUPPORTED"
|
||||
|
||||
cur_result["elapsed_time"] = end - start
|
||||
|
||||
toolchain_output = toolchain.get_output()
|
||||
|
|
|
@ -2043,15 +2043,20 @@ def build_tests(tests, base_source_paths, build_path, target, toolchain_name,
|
|||
for test_name, test_path in tests.iteritems():
|
||||
test_build_path = os.path.join(build_path, test_path)
|
||||
src_path = base_source_paths + [test_path]
|
||||
bin_file = build_project(src_path, test_build_path, target, toolchain_name,
|
||||
options=options,
|
||||
jobs=jobs,
|
||||
clean=clean,
|
||||
macros=macros,
|
||||
name=test_name,
|
||||
report=report,
|
||||
properties=properties,
|
||||
verbose=verbose)
|
||||
|
||||
try:
|
||||
bin_file = build_project(src_path, test_build_path, target, toolchain_name,
|
||||
options=options,
|
||||
jobs=jobs,
|
||||
clean=clean,
|
||||
macros=macros,
|
||||
name=test_name,
|
||||
report=report,
|
||||
properties=properties,
|
||||
verbose=verbose)
|
||||
|
||||
except Exception, e:
|
||||
continue
|
||||
|
||||
# If a clean build was carried out last time, disable it for the next build.
|
||||
# Otherwise the previously built test will be deleted.
|
||||
|
|
Loading…
Reference in New Issue