提交 97e91526 编写于 作者: S Simon Glass

buildman: Add -C option to force a reconfigure for each commit

Normally buildman wil try to configure U-Boot for a particular board on the
first commit that it builds in a series. Subsequent commits are built
without reconfiguring which normally works. Where it doesn't, buildman
automatically reconfigures and retries.

To fully emulate the way MAKEALL works, we should have an option to disable
this optimisation.

Add a -C option to cause buildman to always reconfigure on each commit.
Signed-off-by: NSimon Glass <sjg@chromium.org>
上级 772e1738
...@@ -431,7 +431,8 @@ class BuilderThread(threading.Thread): ...@@ -431,7 +431,8 @@ class BuilderThread(threading.Thread):
result, request_config = self.RunCommit(commit_upto, result, request_config = self.RunCommit(commit_upto,
brd, work_dir, True, True, False) brd, work_dir, True, True, False)
did_config = True did_config = True
do_config = request_config if not self.builder.force_reconfig:
do_config = request_config
# If we built that commit, then config is done. But if we got # If we built that commit, then config is done. But if we got
# an warning, reconfig next time to force it to build the same # an warning, reconfig next time to force it to build the same
...@@ -524,6 +525,12 @@ class Builder: ...@@ -524,6 +525,12 @@ class Builder:
toolchains: Toolchains object to use for building toolchains: Toolchains object to use for building
upto: Current commit number we are building (0.count-1) upto: Current commit number we are building (0.count-1)
warned: Number of builds that produced at least one warning warned: Number of builds that produced at least one warning
force_reconfig: Reconfigure U-Boot on each comiit. This disables
incremental building, where buildman reconfigures on the first
commit for a baord, and then just does an incremental build for
the following commits. In fact buildman will reconfigure and
retry for any failing commits, so generally the only effect of
this option is to slow things down.
Private members: Private members:
_base_board_dict: Last-summarised Dict of boards _base_board_dict: Last-summarised Dict of boards
...@@ -593,6 +600,7 @@ class Builder: ...@@ -593,6 +600,7 @@ class Builder:
self._next_delay_update = datetime.now() self._next_delay_update = datetime.now()
self.force_config_on_failure = True self.force_config_on_failure = True
self.force_build_failures = False self.force_build_failures = False
self.force_reconfig = False
self._step = step self._step = step
self.col = terminal.Color() self.col = terminal.Color()
......
...@@ -67,6 +67,9 @@ parser.add_option('-B', '--bloat', dest='show_bloat', ...@@ -67,6 +67,9 @@ parser.add_option('-B', '--bloat', dest='show_bloat',
help='Show changes in function code size for each board') help='Show changes in function code size for each board')
parser.add_option('-c', '--count', dest='count', type='int', parser.add_option('-c', '--count', dest='count', type='int',
default=-1, help='Run build on the top n commits') default=-1, help='Run build on the top n commits')
parser.add_option('-C', '--force-reconfig', dest='force_reconfig',
action='store_true', default=False,
help='Reconfigure for every commit (disable incremental build)')
parser.add_option('-e', '--show_errors', action='store_true', parser.add_option('-e', '--show_errors', action='store_true',
default=False, help='Show errors and warnings') default=False, help='Show errors and warnings')
parser.add_option('-f', '--force-build', dest='force_build', parser.add_option('-f', '--force-build', dest='force_build',
......
...@@ -157,6 +157,7 @@ def DoBuildman(options, args): ...@@ -157,6 +157,7 @@ def DoBuildman(options, args):
else: else:
builder.force_build = options.force_build builder.force_build = options.force_build
builder.force_build_failures = options.force_build_failures builder.force_build_failures = options.force_build_failures
builder.force_reconfig = options.force_reconfig
# Work out which boards to build # Work out which boards to build
board_selected = boards.GetSelectedDict() board_selected = boards.GetSelectedDict()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册