Revision: 22313
Author:   [email protected]
Date:     Thu Jul 10 09:48:31 2014 UTC
Log:      Only compare allocation output in predictable mode.

This also adds an assert that makes sure allocations are printed.

BUG=391747
LOG=n
[email protected]

Review URL: https://codereview.chromium.org/377213005
http://code.google.com/p/v8/source/detail?r=22313

Modified:
 /branches/bleeding_edge/tools/testrunner/local/execution.py
 /branches/bleeding_edge/tools/testrunner/objects/output.py

=======================================
--- /branches/bleeding_edge/tools/testrunner/local/execution.py Wed Jul 9 12:48:08 2014 UTC +++ /branches/bleeding_edge/tools/testrunner/local/execution.py Thu Jul 10 09:48:31 2014 UTC
@@ -65,6 +65,7 @@
     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 @@
     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 @@
       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 @@
     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 = []
=======================================
--- /branches/bleeding_edge/tools/testrunner/objects/output.py Tue Jul 8 15:59:23 2014 UTC +++ /branches/bleeding_edge/tools/testrunner/objects/output.py Thu Jul 10 09:48:31 2014 UTC
@@ -38,12 +38,6 @@
     self.stdout = stdout
     self.stderr = stderr

-  def __ne__(self, other):
-    return (self.exit_code != other.exit_code or
-            self.timed_out != other.timed_out or
-            self.stdout != other.stdout or
-            self.stderr != other.stderr)
-
   def HasCrashed(self):
     if utils.IsWindows():
return 0x80000000 & self.exit_code and not (0x3FFFFF00 & self.exit_code)

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to