浏览代码

buildman: Add a message indicating there are no errors

If buildman finds no problems it prints nothing. This can be a bit confusing,
so add a message that all is well.

Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass 10 年之前
父节点
当前提交
28370c1b99
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      tools/buildman/builder.py

+ 7 - 0
tools/buildman/builder.py

@@ -210,6 +210,7 @@ class Builder:
         self.force_reconfig = False
         self.force_reconfig = False
         self._step = step
         self._step = step
         self.in_tree = False
         self.in_tree = False
+        self._error_lines = 0
 
 
         self.col = terminal.Color()
         self.col = terminal.Color()
 
 
@@ -891,10 +892,13 @@ class Builder:
                         self.col.MAGENTA)
                         self.col.MAGENTA)
             for arch, target_list in arch_list.iteritems():
             for arch, target_list in arch_list.iteritems():
                 print '%10s: %s' % (arch, target_list)
                 print '%10s: %s' % (arch, target_list)
+                self._error_lines += 1
             if better_err:
             if better_err:
                 print self.col.Color(self.col.GREEN, '\n'.join(better_err))
                 print self.col.Color(self.col.GREEN, '\n'.join(better_err))
+                self._error_lines += 1
             if worse_err:
             if worse_err:
                 print self.col.Color(self.col.RED, '\n'.join(worse_err))
                 print self.col.Color(self.col.RED, '\n'.join(worse_err))
+                self._error_lines += 1
 
 
         if show_sizes:
         if show_sizes:
             self.PrintSizeSummary(board_selected, board_dict, show_detail,
             self.PrintSizeSummary(board_selected, board_dict, show_detail,
@@ -937,9 +941,12 @@ class Builder:
         self.commit_count = len(commits) if commits else 1
         self.commit_count = len(commits) if commits else 1
         self.commits = commits
         self.commits = commits
         self.ResetResultSummary(board_selected)
         self.ResetResultSummary(board_selected)
+        self._error_lines = 0
 
 
         for commit_upto in range(0, self.commit_count, self._step):
         for commit_upto in range(0, self.commit_count, self._step):
             self.ProduceResultSummary(commit_upto, commits, board_selected)
             self.ProduceResultSummary(commit_upto, commits, board_selected)
+        if not self._error_lines:
+            print self.col.Color(self.col.GREEN, '(no errors to report)')
 
 
 
 
     def SetupBuild(self, board_selected, commits):
     def SetupBuild(self, board_selected, commits):