aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2024-06-23 11:55:11 -0600
committerSimon Glass <sjg@chromium.org>2024-07-03 07:36:33 +0100
commit3187da4bea64f94055239761fc0f58a68c8e3236 (patch)
tree928ef87f84b33d75a89472c68a8f64cd6bdf12c2 /tools
parent3f972a465548b76b3ce76d99d7acf03492d3e1f7 (diff)
downloadu-boot-3187da4bea64f94055239761fc0f58a68c8e3236.zip
u-boot-3187da4bea64f94055239761fc0f58a68c8e3236.tar.gz
u-boot-3187da4bea64f94055239761fc0f58a68c8e3236.tar.bz2
buildman: Make mrproper an argument to run_commit()
Pass this in so the caller can change it independently of the member variable. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/buildman/builderthread.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index ff63f93..0a7ff2e 100644
--- a/tools/buildman/builderthread.py
+++ b/tools/buildman/builderthread.py
@@ -448,9 +448,9 @@ class BuilderThread(threading.Thread):
result.cmd_list = cmd_list
return result, do_config
- def run_commit(self, commit_upto, brd, work_dir, do_config, config_only,
- force_build, force_build_failures, work_in_output,
- adjust_cfg):
+ def run_commit(self, commit_upto, brd, work_dir, do_config, mrproper,
+ config_only, force_build, force_build_failures,
+ work_in_output, adjust_cfg):
"""Build a particular commit.
If the build is already done, and we are not forcing a build, we skip
@@ -461,6 +461,7 @@ class BuilderThread(threading.Thread):
brd (Board): Board to build
work_dir (str): Directory to which the source will be checked out
do_config (bool): True to run a make <board>_defconfig on the source
+ mrproper (bool): True to run mrproper first
config_only (bool): Only configure the source, do not build it
force_build (bool): Force a build even if one was previously done
force_build_failures (bool): Force a bulid if the previous result
@@ -501,7 +502,7 @@ class BuilderThread(threading.Thread):
if self.toolchain:
commit = self._checkout(commit_upto, work_dir)
result, do_config = self._config_and_build(
- commit_upto, brd, work_dir, do_config, self.mrproper,
+ commit_upto, brd, work_dir, do_config, mrproper,
config_only, adjust_cfg, commit, out_dir, out_rel_dir,
result)
result.already_done = False
@@ -692,7 +693,8 @@ class BuilderThread(threading.Thread):
force_build = False
for commit_upto in range(0, len(job.commits), job.step):
result, request_config = self.run_commit(commit_upto, brd,
- work_dir, do_config, self.builder.config_only,
+ work_dir, do_config, self.mrproper,
+ self.builder.config_only,
force_build or self.builder.force_build,
self.builder.force_build_failures,
job.work_in_output, job.adjust_cfg)
@@ -703,8 +705,8 @@ class BuilderThread(threading.Thread):
# with a reconfig.
if self.builder.force_config_on_failure:
result, request_config = self.run_commit(commit_upto,
- brd, work_dir, True, False, True, False,
- job.work_in_output, job.adjust_cfg)
+ brd, work_dir, True, self.mrproper, False, True,
+ False, job.work_in_output, job.adjust_cfg)
did_config = True
if not self.builder.force_reconfig:
do_config = request_config
@@ -748,7 +750,7 @@ class BuilderThread(threading.Thread):
else:
# Just build the currently checked-out build
result, request_config = self.run_commit(None, brd, work_dir, True,
- self.builder.config_only, True,
+ self.mrproper, self.builder.config_only, True,
self.builder.force_build_failures, job.work_in_output,
job.adjust_cfg)
result.commit_upto = 0