]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
buildman: Exit with the return code consistently
authorSimon Glass <sjg@chromium.org>
Wed, 19 Jul 2023 23:48:11 +0000 (17:48 -0600)
committerSimon Glass <sjg@chromium.org>
Mon, 24 Jul 2023 15:34:10 +0000 (09:34 -0600)
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>
tools/buildman/main.py

index 5cbdce7cf34d03a854cbc9794dadb942d0d40a17..096f5328a272ae6be217cafa5a0c344c239eb6a4 100755 (executable)
@@ -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())