Skip to content

Commit 3a3f115

Browse files
committed
dist/tools/compile_test: error exit code on any failed build
1 parent 82e52d3 commit 3a3f115

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

dist/tools/compile_test/compile_like_murdock.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ def _build(app, board, toolchain, jobs, env, cwd, args):
203203
if args.very_very_verbose:
204204
print(out)
205205
print(f"{app: <30} {board: <30} PASS")
206+
return True
206207
except subprocess.CalledProcessError as err:
207208
err.output = err.output.decode("utf-8", errors="replace")
208209
lines = err.output.split("\n")
@@ -215,6 +216,7 @@ def _build(app, board, toolchain, jobs, env, cwd, args):
215216
print(f"{app: <30} {board: <30} FAIL: Kconfig hash mismatch")
216217
else:
217218
print(f"{app: <30} {board: <30} FAIL")
219+
return False
218220

219221

220222
def main():
@@ -263,6 +265,7 @@ def main():
263265
if 'all' in apps:
264266
apps = _all_apps(riot_dir)
265267

268+
ret = 0
266269
for app in apps:
267270
test_dir = str(pathlib.PurePath(riot_dir, app))
268271
if not pathlib.Path(test_dir).exists():
@@ -283,10 +286,12 @@ def main():
283286
_modules_packages(app, board, args.jobs, full_env, riot_dir,
284287
args)
285288
else:
286-
_build(app, board, args.toolchain, args.jobs, full_env,
287-
riot_dir, args)
289+
if not _build(app, board, args.toolchain, args.jobs, full_env,
290+
riot_dir, args):
291+
ret = -1
288292
elapse_time = datetime.datetime.now() - start_time
289293
_end(elapse_time.total_seconds(), args.jobs)
294+
exit(ret)
290295

291296

292297
if __name__ == '__main__':

0 commit comments

Comments
 (0)