Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Unified Diff: tools/testrunner/local/progress.py

Issue 1153103003: [test] Remove default for zero test cases. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/run-tests.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testrunner/local/progress.py
diff --git a/tools/testrunner/local/progress.py b/tools/testrunner/local/progress.py
index e40872f1824848294d98efb7f309908b9808d8c4..19d39f7e6193e4a66857564200a1cb019c3f1d7b 100644
--- a/tools/testrunner/local/progress.py
+++ b/tools/testrunner/local/progress.py
@@ -200,10 +200,12 @@ class CompactProgressIndicator(ProgressIndicator):
def PrintProgress(self, name):
self.ClearLine(self.last_status_length)
elapsed = time.time() - self.start_time
+ progress = 0 if not self.runner.total else (
+ ((self.runner.total - self.runner.remaining) * 100) //
+ self.runner.total)
status = self.templates['status_line'] % {
'passed': self.runner.succeeded,
- 'remaining': (((self.runner.total - self.runner.remaining) * 100) //
- self.runner.total),
+ 'progress': progress,
'failed': len(self.runner.failed),
'test': name,
'mins': int(elapsed) / 60,
@@ -220,7 +222,7 @@ class ColorProgressIndicator(CompactProgressIndicator):
def __init__(self):
templates = {
'status_line': ("[%(mins)02i:%(secs)02i|"
- "\033[34m%%%(remaining) 4d\033[0m|"
+ "\033[34m%%%(progress) 4d\033[0m|"
"\033[32m+%(passed) 4d\033[0m|"
"\033[31m-%(failed) 4d\033[0m]: %(test)s"),
'stdout': "\033[1m%s\033[0m",
@@ -236,7 +238,7 @@ class MonochromeProgressIndicator(CompactProgressIndicator):
def __init__(self):
templates = {
- 'status_line': ("[%(mins)02i:%(secs)02i|%%%(remaining) 4d|"
+ 'status_line': ("[%(mins)02i:%(secs)02i|%%%(progress) 4d|"
"+%(passed) 4d|-%(failed) 4d]: %(test)s"),
'stdout': '%s',
'stderr': '%s',
« no previous file with comments | « tools/run-tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698