[tools-build.py]Enforce supported toolchains

by skipping unsupported combinations
pull/2172/head
Jimmy Brisson 2016-07-14 13:14:37 -05:00
parent d0d023ab58
commit 24fcb4700b
1 changed files with 47 additions and 45 deletions

View File

@ -231,52 +231,54 @@ if __name__ == '__main__':
for toolchain in toolchains: for toolchain in toolchains:
for target in targets: for target in targets:
tt_id = "%s::%s" % (toolchain, target) tt_id = "%s::%s" % (toolchain, target)
try: if toolchain not in TARGET_MAP[target].supported_toolchains:
mcu = TARGET_MAP[target] # Log this later
if options.source_dir: print "%s skipped: toolchain not supported" % tt_id
lib_build_res = build_library(options.source_dir, options.build_dir, mcu, toolchain, skipped.append(tt_id)
options=options.options, else:
extra_verbose=options.extra_verbose_notify, try:
notify=notify, mcu = TARGET_MAP[target]
verbose=options.verbose, if options.source_dir:
silent=options.silent, lib_build_res = build_library(options.source_dir, options.build_dir, mcu, toolchain,
jobs=options.jobs, options=options.options,
clean=options.clean, extra_verbose=options.extra_verbose_notify,
archive=(not options.no_archive), verbose=options.verbose,
macros=options.macros, silent=options.silent,
name=options.artifact_name) jobs=options.jobs,
else: clean=options.clean,
lib_build_res = build_mbed_libs(mcu, toolchain, archive=(not options.no_archive),
options=options.options, macros=options.macros,
extra_verbose=options.extra_verbose_notify, name=options.artifact_name)
notify=notify, else:
verbose=options.verbose, lib_build_res = build_mbed_libs(mcu, toolchain,
silent=options.silent, options=options.options,
jobs=options.jobs, extra_verbose=options.extra_verbose_notify,
clean=options.clean, verbose=options.verbose,
macros=options.macros) silent=options.silent,
jobs=options.jobs,
clean=options.clean,
macros=options.macros)
for lib_id in libraries: for lib_id in libraries:
build_lib(lib_id, mcu, toolchain, build_lib(lib_id, mcu, toolchain,
options=options.options, options=options.options,
extra_verbose=options.extra_verbose_notify, extra_verbose=options.extra_verbose_notify,
notify=notify, verbose=options.verbose,
verbose=options.verbose, silent=options.silent,
silent=options.silent, clean=options.clean,
clean=options.clean, macros=options.macros,
macros=options.macros, jobs=options.jobs)
jobs=options.jobs) if lib_build_res:
if lib_build_res: successes.append(tt_id)
successes.append(tt_id) else:
else: skipped.append(tt_id)
skipped.append(tt_id) except Exception, e:
except Exception, e: if options.verbose:
if options.verbose: import traceback
import traceback traceback.print_exc(file=sys.stdout)
traceback.print_exc(file=sys.stdout) sys.exit(1)
sys.exit(1) failures.append(tt_id)
failures.append(tt_id) print e
print e
# Write summary of the builds # Write summary of the builds
print print