aboutsummaryrefslogtreecommitdiff
path: root/tools/buildman
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-19 17:48:11 -0600
committerSimon Glass <sjg@chromium.org>2023-07-24 09:34:10 -0600
commit8dae07aa404a08297c1b0a3ae3963c7758026227 (patch)
treeadb2589f1ff877027b6d9a351a4147f66149941c /tools/buildman
parenteadbfa6b0870de3bf6639dd6c3864a2ed5ac2aa9 (diff)
downloadu-boot-8dae07aa404a08297c1b0a3ae3963c7758026227.zip
u-boot-8dae07aa404a08297c1b0a3ae3963c7758026227.tar.gz
u-boot-8dae07aa404a08297c1b0a3ae3963c7758026227.tar.bz2
buildman: Exit with the return code consistently
Test should return a suitable exit code when they fail. Fix this and tidy up the code a little. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman')
-rwxr-xr-xtools/buildman/main.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/buildman/main.py b/tools/buildman/main.py
index 5cbdce7..096f532 100755
--- a/tools/buildman/main.py
+++ b/tools/buildman/main.py
@@ -62,14 +62,16 @@ def run_buildman():
# Run our meagre tests
if cmdline.HAS_TESTS and options.test:
- RunTests(options.skip_net_tests, options.debug, options.verbose, args)
+ return RunTests(options.skip_net_tests, options.debug, options.verbose,
+ args)
# Build selected commits for selected boards
else:
bsettings.Setup(options.config_file)
ret_code = control.DoBuildman(options, args)
- sys.exit(ret_code)
+ return ret_code
+ return 0
if __name__ == "__main__":
- run_buildman()
+ sys.exit(run_buildman())