aboutsummaryrefslogtreecommitdiff
path: root/tools/buildman/control.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-04-29 21:03:38 -0400
committerTom Rini <trini@konsulko.com>2021-04-29 21:03:38 -0400
commit8ddaf943589756442bba21e5be645cd47526d82b (patch)
tree5790a6435ce416342bc9747a55d2f23a8f141c2e /tools/buildman/control.py
parentf3a0d2c1af630cc09a34c2159aa2dfa12b831762 (diff)
parent5b700cdcff61426843405ca1df4b549237e8bbc2 (diff)
Merge tag 'dm-pull-29apr21' of https://source.denx.de/u-boot/custodians/u-boot-dm
buildman environment fix binman FMAP improvements minor test improvements and fixes minor dm improvements
Diffstat (limited to 'tools/buildman/control.py')
-rw-r--r--tools/buildman/control.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index a767570146..a98d1b4c06 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -110,7 +110,7 @@ def ShowToolchainPrefix(boards, toolchains):
return None
def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
- clean_dir=False):
+ clean_dir=False, test_thread_exceptions=False):
"""The main control code for buildman
Args:
@@ -124,6 +124,11 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
arguments. This setting is useful for tests.
board: Boards() object to use, containing a list of available
boards. If this is None it will be created and scanned.
+ clean_dir: Used for tests only, indicates that the existing output_dir
+ should be removed before starting the build
+ test_thread_exceptions: Uses for tests only, True to make the threads
+ raise an exception instead of reporting their result. This simulates
+ a failure in the code somewhere
"""
global builder
@@ -328,7 +333,8 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
config_only=options.config_only,
squash_config_y=not options.preserve_config_y,
warnings_as_errors=options.warnings_as_errors,
- work_in_output=options.work_in_output)
+ work_in_output=options.work_in_output,
+ test_thread_exceptions=test_thread_exceptions)
builder.force_config_on_failure = not options.quick
if make_func:
builder.do_make = make_func
@@ -368,9 +374,11 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None,
if options.summary:
builder.ShowSummary(commits, board_selected)
else:
- fail, warned = builder.BuildBoards(commits, board_selected,
- options.keep_outputs, options.verbose)
- if fail:
+ fail, warned, excs = builder.BuildBoards(
+ commits, board_selected, options.keep_outputs, options.verbose)
+ if excs:
+ return 102
+ elif fail:
return 100
elif warned and not options.ignore_warnings:
return 101