[PATCH v4 03/83] buildman: Exit with the return code consistently

Simon Glass sjg at chromium.org
Thu Jul 20 01:48:11 CEST 2023


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 at chromium.org>
---

(no changes since v3)

Changes in v3:
- Add new patch to exit with the return code consistently

 tools/buildman/main.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tools/buildman/main.py b/tools/buildman/main.py
index 5cbdce7cf34d..096f5328a272 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())
-- 
2.41.0.487.g6d72f3e995-goog



More information about the U-Boot mailing list