Skip to content

Commit a3bb8e3

Browse files
committed
Allow eclipse to fail for mysteriously in build
1 parent 9d51b1a commit a3bb8e3

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

tools/export/mcuxpresso/__init__.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,12 @@ def build(project_name, log_name="build_log.txt", cleanup=True):
277277
stdout_string = "=" * 10 + "STDOUT" + "=" * 10 + "\n"
278278
err_string = "=" * 10 + "STDERR" + "=" * 10 + "\n"
279279
err_string += err
280+
success = any(l.startswith("Finished building target:") for l in out.split("\n"))
280281

281-
ret_string = "SUCCESS\n"
282-
if ret_code != 0:
283-
ret_string += "FAILURE\n"
282+
if success:
283+
ret_string = "SUCCESS\n"
284+
else:
285+
ret_string = "FAILURE: build returned %s \n" % ret_code
284286

285287
print "%s\n%s\n%s\n%s" % (stdout_string, out, err_string, ret_string)
286288

@@ -309,12 +311,7 @@ def build(project_name, log_name="build_log.txt", cleanup=True):
309311
if exists(tmp_folder):
310312
shutil.rmtree(tmp_folder)
311313

312-
if ret_code == 0:
313-
# Return Success
314-
return 0
315-
316-
# Seems like something went wrong.
317-
return -1
314+
return not(success)
318315

319316

320317
# -------------------------------------------------------------------------

0 commit comments

Comments
 (0)