summaryrefslogtreecommitdiff
path: root/tools/buildman/builder.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-08-09 15:33:03 -0600
committerSimon Glass <sjg@chromium.org>2014-08-13 08:34:15 -0600
commite5a0e5d84239c71a156a0a14d9332c5532f2411e (patch)
tree8f868766dea9ec705ed6b38003e3d3c303c67c54 /tools/buildman/builder.py
parentb2ea7ab25258621871db1f884be1a2f2b1641741 (diff)
buildman: Add verbose option to display errors as they happen
Normally buildman operates in two passes - one to do the build and another to summarise the errors. Add a verbose option (-v) to display build problems as they happen. With -e also given, this will display errors too. When building the current source tree (rather than a list of commits in a branch), both -v and -e are enabled automatically. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/builder.py')
-rw-r--r--tools/buildman/builder.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index a6c43e0416..dd7f5a459f 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -321,7 +321,8 @@ class Builder:
"""Process the result of a build, showing progress information
Args:
- result: A CommandResult object
+ result: A CommandResult object, which indicates the result for
+ a single build
"""
col = terminal.Color()
if result:
@@ -339,6 +340,13 @@ class Builder:
self.warned += 1
if result.already_done:
self.already_done += 1
+ if self._verbose:
+ print '\r',
+ self.ClearLine(0)
+ boards_selected = {target : result.brd}
+ self.ResetResultSummary(boards_selected)
+ self.ProduceResultSummary(result.commit_upto, self.commits,
+ boards_selected)
else:
target = '(starting)'
@@ -362,7 +370,7 @@ class Builder:
name += target
print line + name,
- length = 13 + len(name)
+ length = 14 + len(name)
self.ClearLine(length)
def _GetOutputDir(self, commit_upto):
@@ -1041,7 +1049,7 @@ class Builder:
if dirname not in dir_list:
shutil.rmtree(dirname)
- def BuildBoards(self, commits, board_selected, keep_outputs):
+ def BuildBoards(self, commits, board_selected, keep_outputs, verbose):
"""Build all commits for a list of boards
Args:
@@ -1049,9 +1057,11 @@ class Builder:
boards_selected: Dict of selected boards, key is target name,
value is Board object
keep_outputs: True to save build output files
+ verbose: Display build results as they are completed
"""
self.commit_count = len(commits) if commits else 1
self.commits = commits
+ self._verbose = verbose
self.ResetResultSummary(board_selected)
builderthread.Mkdir(self.base_dir)