Reviewers: Jakob,

Message:
PTAL

Description:
Fix result status of rerun flaky tests.

Tests that pass on reruns where wrongly treated as failures. Now the result
state can include any of (PASS, FAIL, CRASH, TIMEOUT)

BUG=374134
LOG=n

Please review this at https://codereview.chromium.org/363883003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+11, -9 lines):
  M tools/testrunner/local/progress.py
  M tools/testrunner/local/testsuite.py


Index: tools/testrunner/local/progress.py
diff --git a/tools/testrunner/local/progress.py b/tools/testrunner/local/progress.py index 3167028186cb51e8b55a8cb8f88a5cf7599db3cd..2c9f650013eb5daacb75af09985009a960545806 100644
--- a/tools/testrunner/local/progress.py
+++ b/tools/testrunner/local/progress.py
@@ -322,6 +322,7 @@ class JsonTestProgressIndicator(ProgressIndicator):
       # Omit tests that pass on the first run, but collect output of tests
       # that pass when rerun.
       return
+
     self.results.append({
       "name": test.GetLabel(),
       "flags": test.flags,
@@ -331,7 +332,7 @@ class JsonTestProgressIndicator(ProgressIndicator):
       "stdout": test.output.stdout,
       "stderr": test.output.stderr,
       "exit_code": test.output.exit_code,
-      "result": "CRASH" if test.output.HasCrashed() else "FAIL",
+      "result": test.suite.GetOutcome(test),
     })


Index: tools/testrunner/local/testsuite.py
diff --git a/tools/testrunner/local/testsuite.py b/tools/testrunner/local/testsuite.py index ff51196a563e4b5607c90f0436b0f1fc67dd9bbc..0fd3f3a3000a35ac2c06549b36e7c4cecd907e80 100644
--- a/tools/testrunner/local/testsuite.py
+++ b/tools/testrunner/local/testsuite.py
@@ -190,18 +190,19 @@ class TestSuite(object):
     else:
       return execution_failed

-  def HasUnexpectedOutput(self, testcase):
+  def GetOutcome(self, testcase):
     if testcase.output.HasCrashed():
-      outcome = statusfile.CRASH
+      return statusfile.CRASH
     elif testcase.output.HasTimedOut():
-      outcome = statusfile.TIMEOUT
+      return statusfile.TIMEOUT
     elif self.HasFailed(testcase):
-      outcome = statusfile.FAIL
+      return statusfile.FAIL
     else:
-      outcome = statusfile.PASS
-    if not testcase.outcomes:
-      return outcome != statusfile.PASS
-    return not outcome in testcase.outcomes
+      return statusfile.PASS
+
+  def HasUnexpectedOutput(self, testcase):
+    outcome = self.GetOutcome(testcase)
+    return not outcome in (testcase.outcomes or [statusfile.PASS])

   def StripOutputForTransmit(self, testcase):
     if not self.HasUnexpectedOutput(testcase):


--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to