summaryrefslogtreecommitdiffstats
path: root/tools/buildman/builderthread.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-11-13 14:25:51 -0700
committerSimon Glass <sjg@chromium.org>2016-12-02 10:37:47 -0700
commitb50113f373a95d28cf001eb20adc6ef56f8ba14c (patch)
treed4b50e5374baed0b2646caf050fa868b2855299e /tools/buildman/builderthread.py
parent1bd876301b1b6a2046cd1415fff71f5e8a30e6b4 (diff)
downloadu-boot-b50113f373a95d28cf001eb20adc6ef56f8ba14c.tar.gz
u-boot-b50113f373a95d28cf001eb20adc6ef56f8ba14c.tar.xz
u-boot-b50113f373a95d28cf001eb20adc6ef56f8ba14c.zip
buildman: Add an option to just create the config
Normally buildman does a full build of a board. This includes creating the u-boot.cfg file which contains all the configuration options. Buildman uses this file with the -K option, to show differences in effective configuration for each commit. Doing a full build of U-Boot just to create the u-boot.cfg file is wasteful. Add a -D option which causes buildman to only create the configuration. This is enough to support use of -K and can be done much more quickly (typically 5-10 times faster). Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/builderthread.py')
-rw-r--r--tools/buildman/builderthread.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/buildman/builderthread.py b/tools/buildman/builderthread.py
index 8974351225..926f267e21 100644
--- a/tools/buildman/builderthread.py
+++ b/tools/buildman/builderthread.py
@@ -110,8 +110,8 @@ class BuilderThread(threading.Thread):
return self.builder.do_make(commit, brd, stage, cwd, *args,
**kwargs)
- def RunCommit(self, commit_upto, brd, work_dir, do_config, force_build,
- force_build_failures):
+ def RunCommit(self, commit_upto, brd, work_dir, do_config, do_build,
+ force_build, force_build_failures):
"""Build a particular commit.
If the build is already done, and we are not forcing a build, we skip
@@ -122,6 +122,7 @@ class BuilderThread(threading.Thread):
brd: Board object to build
work_dir: Directory to which the source will be checked out
do_config: True to run a make <board>_defconfig on the source
+ do_build: Try to build the source
force_build: Force a build even if one was previously done
force_build_failures: Force a bulid if the previous result showed
failure
@@ -231,6 +232,8 @@ class BuilderThread(threading.Thread):
config_out += result.combined
do_config = False # No need to configure next time
if result.return_code == 0:
+ if not do_build:
+ args.append('cfg')
result = self.Make(commit, brd, 'build', cwd, *args,
env=env)
result.stderr = result.stderr.replace(src_dir + '/', '')
@@ -401,7 +404,7 @@ class BuilderThread(threading.Thread):
force_build = False
for commit_upto in range(0, len(job.commits), job.step):
result, request_config = self.RunCommit(commit_upto, brd,
- work_dir, do_config,
+ work_dir, do_config, not self.builder.config_only,
force_build or self.builder.force_build,
self.builder.force_build_failures)
failed = result.return_code or result.stderr
@@ -411,7 +414,7 @@ class BuilderThread(threading.Thread):
# with a reconfig.
if self.builder.force_config_on_failure:
result, request_config = self.RunCommit(commit_upto,
- brd, work_dir, True, True, False)
+ brd, work_dir, True, False, True, False)
did_config = True
if not self.builder.force_reconfig:
do_config = request_config
@@ -455,7 +458,8 @@ class BuilderThread(threading.Thread):
else:
# Just build the currently checked-out build
result, request_config = self.RunCommit(None, brd, work_dir, True,
- True, self.builder.force_build_failures)
+ not self.builder.config_only, True,
+ self.builder.force_build_failures)
result.commit_upto = 0
self._WriteResult(result, job.keep_outputs)
self.builder.out_queue.put(result)