diff mbox series

[v2,18/28] buildman: Show the number of builds remaining

Message ID 20200409150840.v2.18.I0b22b46f575d45f1b67c61b54d69117e11abdaed@changeid
State Accepted
Commit 6eb76cac1c7b51c71fe9c669befbc4187f5a8989
Headers show
Series buildman: Improve summary output | expand

Commit Message

Simon Glass April 9, 2020, 9:08 p.m. UTC
It is nice to see the actual number of builds remaining to complete. Add
this in the progress message, using a different colour.

Drop the unnecessary 'name' variable while we are here.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2: None

 tools/buildman/builder.py | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

Comments

Simon Glass April 17, 2020, 11:29 p.m. UTC | #1
It is nice to see the actual number of builds remaining to complete. Add
this in the progress message, using a different colour.

Drop the unnecessary 'name' variable while we are here.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2: None

 tools/buildman/builder.py | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/tools/buildman/builder.py b/tools/buildman/builder.py
index ae8eee16e35..b9caf6cf9c1 100644
--- a/tools/buildman/builder.py
+++ b/tools/buildman/builder.py
@@ -444,16 +444,21 @@  class Builder:
         line += self.col.Color(self.col.YELLOW, '%5d' % self.warned)
         line += self.col.Color(self.col.RED, '%5d' % self.fail)
 
-        name = ' /%-5d  ' % self.count
+        line += ' /%-5d  ' % self.count
+        remaining = self.count - self.upto
+        if remaining:
+            line += self.col.Color(self.col.MAGENTA, ' -%-5d  ' % remaining)
+        else:
+            line += ' ' * 8
 
         # Add our current completion time estimate
         self._AddTimestamp()
         if self._complete_delay:
-            name += '%s  : ' % self._complete_delay
+            line += '%s  : ' % self._complete_delay
 
-        name += target
+        line += target
         terminal.PrintClear()
-        Print(line + name, newline=False)
+        Print(line, newline=False)
 
     def _GetOutputDir(self, commit_upto):
         """Get the name of the output directory for a commit number