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

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

Issue 1168303007: [test] Refactoring - Let runner handle test IDs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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') | tools/testrunner/network/network_execution.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testrunner/local/execution.py
diff --git a/tools/testrunner/local/execution.py b/tools/testrunner/local/execution.py
index 2b2f876d24f06a421853e41d24f2ab1be6d5acca..07c221e32faf5acec55dc40acb9c28523faa355b 100644
--- a/tools/testrunner/local/execution.py
+++ b/tools/testrunner/local/execution.py
@@ -73,15 +73,19 @@ class Runner(object):
for t in self.tests:
t.duration = self.perfdata.FetchPerfData(t) or 1.0
self.tests.sort(key=lambda t: t.duration, reverse=True)
- self._CommonInit(len(self.tests), progress_indicator, context)
+ self._CommonInit(suites, progress_indicator, context)
- def _CommonInit(self, num_tests, progress_indicator, context):
+ def _CommonInit(self, suites, progress_indicator, context):
+ self.total = 0
+ for s in suites:
+ for t in s.tests:
+ t.id = self.total
+ self.total += 1
self.indicator = progress_indicator
progress_indicator.runner = self
self.context = context
self.succeeded = 0
- self.total = num_tests
- self.remaining = num_tests
+ self.remaining = self.total
self.failed = []
self.crashed = 0
self.reran_tests = 0
@@ -132,6 +136,7 @@ class Runner(object):
test.run += 1
pool.add([self._GetJob(test)])
self.remaining += 1
+ self.total += 1
def _ProcessTestNormal(self, test, result, pool):
self.indicator.AboutToRun(test)
« no previous file with comments | « tools/run-tests.py ('k') | tools/testrunner/network/network_execution.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698