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

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

Issue 377213005: Only compare allocation output in predictable mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | « no previous file | tools/testrunner/objects/output.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 a6dce636e1182b86c4952ee284c367b026aa3d17..36ce7be83f64adbd31d42927a821e063c647f3b9 100644
--- a/tools/testrunner/local/execution.py
+++ b/tools/testrunner/local/execution.py
@@ -65,6 +65,7 @@ class Runner(object):
self.perf_data_manager = perfdata.PerfDataManager(self.datapath)
self.perfdata = self.perf_data_manager.GetStore(context.arch, context.mode)
self.perf_failures = False
+ self.printed_allocations = False
self.tests = [ t for s in suites for t in s.tests ]
if not context.no_sorting:
for t in self.tests:
@@ -149,6 +150,15 @@ class Runner(object):
return not has_unexpected_output
def _ProcessTestPredictable(self, test, result, pool):
+ def HasDifferentAllocations(output1, output2):
+ def AllocationStr(stdout):
+ for line in reversed((stdout or "").splitlines()):
+ if line.startswith("### Allocations = "):
+ self.printed_allocations = True
+ return line
+ return ""
+ return (AllocationStr(output1.stdout) != AllocationStr(output2.stdout))
+
# Always pass the test duration for the database update.
test.duration = result[2]
if test.run == 1 and result[1].HasTimedOut():
@@ -159,10 +169,10 @@ class Runner(object):
self.remaining -= 1
self.failed.append(test)
self.indicator.HasRun(test, True)
- if test.run > 1 and test.output != result[1]:
- # From the second run on, check for differences. If a difference is
- # found, call the indicator twice to report both tests. All runs of each
- # test are counted as one for the statistic.
+ if test.run > 1 and HasDifferentAllocations(test.output, result[1]):
+ # From the second run on, check for different allocations. If a
+ # difference is found, call the indicator twice to report both tests.
+ # All runs of each test are counted as one for the statistic.
self.indicator.AboutToRun(test)
self.remaining -= 1
self.failed.append(test)
@@ -233,6 +243,8 @@ class Runner(object):
if queued_exception:
raise queued_exception
+ # Make sure that any allocations were printed in predictable mode.
+ assert not self.context.predictable or self.printed_allocations
def GetCommand(self, test):
d8testflag = []
« no previous file with comments | « no previous file | tools/testrunner/objects/output.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698