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 R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/363883003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22186 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
34eb0262a9
commit
ba584456e6
@ -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),
|
||||
})
|
||||
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user