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

Side by Side Diff: tools/testrunner/local/testsuite.py

Issue 363883003: Fix result status of rerun flaky tests. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/testrunner/local/progress.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2012 the V8 project authors. All rights reserved. 1 # Copyright 2012 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 def IsNegativeTest(self, testcase): 183 def IsNegativeTest(self, testcase):
184 return False 184 return False
185 185
186 def HasFailed(self, testcase): 186 def HasFailed(self, testcase):
187 execution_failed = self.IsFailureOutput(testcase.output, testcase.path) 187 execution_failed = self.IsFailureOutput(testcase.output, testcase.path)
188 if self.IsNegativeTest(testcase): 188 if self.IsNegativeTest(testcase):
189 return not execution_failed 189 return not execution_failed
190 else: 190 else:
191 return execution_failed 191 return execution_failed
192 192
193 def GetOutcome(self, testcase):
194 if testcase.output.HasCrashed():
195 return statusfile.CRASH
196 elif testcase.output.HasTimedOut():
197 return statusfile.TIMEOUT
198 elif self.HasFailed(testcase):
199 return statusfile.FAIL
200 else:
201 return statusfile.PASS
202
193 def HasUnexpectedOutput(self, testcase): 203 def HasUnexpectedOutput(self, testcase):
194 if testcase.output.HasCrashed(): 204 outcome = self.GetOutcome(testcase)
195 outcome = statusfile.CRASH 205 return not outcome in (testcase.outcomes or [statusfile.PASS])
196 elif testcase.output.HasTimedOut():
197 outcome = statusfile.TIMEOUT
198 elif self.HasFailed(testcase):
199 outcome = statusfile.FAIL
200 else:
201 outcome = statusfile.PASS
202 if not testcase.outcomes:
203 return outcome != statusfile.PASS
204 return not outcome in testcase.outcomes
205 206
206 def StripOutputForTransmit(self, testcase): 207 def StripOutputForTransmit(self, testcase):
207 if not self.HasUnexpectedOutput(testcase): 208 if not self.HasUnexpectedOutput(testcase):
208 testcase.output.stdout = "" 209 testcase.output.stdout = ""
209 testcase.output.stderr = "" 210 testcase.output.stderr = ""
210 211
211 def CalculateTotalDuration(self): 212 def CalculateTotalDuration(self):
212 self.total_duration = 0.0 213 self.total_duration = 0.0
213 for t in self.tests: 214 for t in self.tests:
214 self.total_duration += t.duration 215 self.total_duration += t.duration
215 return self.total_duration 216 return self.total_duration
OLDNEW
« no previous file with comments | « tools/testrunner/local/progress.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698