Skip to content

Fixing toolchain executable not found error for build.py #3587

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

Merged
merged 1 commit into from
Jan 26, 2017
Merged
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
27 changes: 14 additions & 13 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,17 @@
successes = []
skipped = []

# CPPCHECK code validation
if options.cppcheck_validation:
for toolchain in toolchains:
if not TOOLCHAIN_CLASSES[toolchain].check_executable():
search_path = TOOLCHAIN_PATHS[toolchain] or "No path set"
args_error(parser, "Could not find executable for %s.\n"
"Currently set search path: %s"
% (toolchain, search_path))
for target in targets:
for toolchain in toolchains:
if not TOOLCHAIN_CLASSES[toolchain].check_executable():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we do these checks all up front? to fail fast.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we can!

search_path = TOOLCHAIN_PATHS[toolchain] or "No path set"
args_error(parser, "Could not find executable for %s.\n"
"Currently set search path: %s"
% (toolchain, search_path))

for toolchain in toolchains:
for target in targets:
# CPPCHECK code validation
if options.cppcheck_validation:
try:
mcu = TARGET_MAP[target]
# CMSIS and MBED libs analysis
Expand All @@ -244,10 +246,8 @@
traceback.print_exc(file=sys.stdout)
sys.exit(1)
print e
else:
# Build
for toolchain in toolchains:
for target in targets:
else:
# Build
tt_id = "%s::%s" % (toolchain, target)
if toolchain not in TARGET_MAP[target].supported_toolchains:
# Log this later
Expand Down Expand Up @@ -299,6 +299,7 @@
failures.append(tt_id)
print e


# Write summary of the builds
print
print "Completed in: (%.2f)s" % (time() - start)
Expand Down