| OLD | NEW |
| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 test.output = result[1] | 131 test.output = result[1] |
| 132 test.duration = result[2] | 132 test.duration = result[2] |
| 133 has_unexpected_output = test.suite.HasUnexpectedOutput(test) | 133 has_unexpected_output = test.suite.HasUnexpectedOutput(test) |
| 134 if has_unexpected_output: | 134 if has_unexpected_output: |
| 135 self.failed.append(test) | 135 self.failed.append(test) |
| 136 if test.output.HasCrashed(): | 136 if test.output.HasCrashed(): |
| 137 self.crashed += 1 | 137 self.crashed += 1 |
| 138 else: | 138 else: |
| 139 self.succeeded += 1 | 139 self.succeeded += 1 |
| 140 self.remaining -= 1 | 140 self.remaining -= 1 |
| 141 self.indicator.HasRun(test, has_unexpected_output) | 141 # For the indicator, everything that happens after the first run is treated |
| 142 # as unexpected even if it flakily passes in order to include it in the |
| 143 # output. |
| 144 self.indicator.HasRun(test, has_unexpected_output or test.run > 1) |
| 142 if has_unexpected_output: | 145 if has_unexpected_output: |
| 143 # Rerun test failures after the indicator has processed the results. | 146 # Rerun test failures after the indicator has processed the results. |
| 144 self._MaybeRerun(pool, test) | 147 self._MaybeRerun(pool, test) |
| 145 # Update the perf database if the test succeeded. | 148 # Update the perf database if the test succeeded. |
| 146 return not has_unexpected_output | 149 return not has_unexpected_output |
| 147 | 150 |
| 148 def _ProcessTestPredictable(self, test, result, pool): | 151 def _ProcessTestPredictable(self, test, result, pool): |
| 149 # Always pass the test duration for the database update. | 152 # Always pass the test duration for the database update. |
| 150 test.duration = result[2] | 153 test.duration = result[2] |
| 151 if test.run == 1 and result[1].HasTimedOut(): | 154 if test.run == 1 and result[1].HasTimedOut(): |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 test.suite.GetFlagsForTestCase(test, self.context) + | 248 test.suite.GetFlagsForTestCase(test, self.context) + |
| 246 self.context.extra_flags) | 249 self.context.extra_flags) |
| 247 return cmd | 250 return cmd |
| 248 | 251 |
| 249 | 252 |
| 250 class BreakNowException(Exception): | 253 class BreakNowException(Exception): |
| 251 def __init__(self, value): | 254 def __init__(self, value): |
| 252 self.value = value | 255 self.value = value |
| 253 def __str__(self): | 256 def __str__(self): |
| 254 return repr(self.value) | 257 return repr(self.value) |
| OLD | NEW |