| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 "--stress-opt" in self.context.mode_flags or | 97 "--stress-opt" in self.context.mode_flags or |
| 98 "--stress-opt" in self.context.extra_flags): | 98 "--stress-opt" in self.context.extra_flags): |
| 99 timeout *= 4 | 99 timeout *= 4 |
| 100 if test.dependency is not None: | 100 if test.dependency is not None: |
| 101 dep_command = [ c.replace(test.path, test.dependency) for c in command ] | 101 dep_command = [ c.replace(test.path, test.dependency) for c in command ] |
| 102 else: | 102 else: |
| 103 dep_command = None | 103 dep_command = None |
| 104 return Job(command, dep_command, test.id, timeout, self.context.verbose) | 104 return Job(command, dep_command, test.id, timeout, self.context.verbose) |
| 105 | 105 |
| 106 def _MaybeRerun(self, pool, test): | 106 def _MaybeRerun(self, pool, test): |
| 107 if test.run <= self.context.rerun_failures_count + 1: | 107 if test.run <= self.context.rerun_failures_count: |
| 108 # Possibly rerun this test if its run count is below the maximum per | 108 # Possibly rerun this test if its run count is below the maximum per |
| 109 # test. +1 as the flag controls reruns not including the first run. | 109 # test. <= as the flag controls reruns not including the first run. |
| 110 if test.run == 1: | 110 if test.run == 1: |
| 111 # Count the overall number of reran tests on the first rerun. | 111 # Count the overall number of reran tests on the first rerun. |
| 112 if self.reran_tests < self.context.rerun_failures_max: | 112 if self.reran_tests < self.context.rerun_failures_max: |
| 113 self.reran_tests += 1 | 113 self.reran_tests += 1 |
| 114 else: | 114 else: |
| 115 # Don't rerun this if the overall number of rerun tests has been | 115 # Don't rerun this if the overall number of rerun tests has been |
| 116 # reached. | 116 # reached. |
| 117 return | 117 return |
| 118 if test.run >= 2 and test.duration > self.context.timeout / 20.0: | 118 if test.run >= 2 and test.duration > self.context.timeout / 20.0: |
| 119 # Rerun slow tests at most once. | 119 # Rerun slow tests at most once. |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 test.suite.GetFlagsForTestCase(test, self.context) + | 248 test.suite.GetFlagsForTestCase(test, self.context) + |
| 249 self.context.extra_flags) | 249 self.context.extra_flags) |
| 250 return cmd | 250 return cmd |
| 251 | 251 |
| 252 | 252 |
| 253 class BreakNowException(Exception): | 253 class BreakNowException(Exception): |
| 254 def __init__(self, value): | 254 def __init__(self, value): |
| 255 self.value = value | 255 self.value = value |
| 256 def __str__(self): | 256 def __str__(self): |
| 257 return repr(self.value) | 257 return repr(self.value) |
| OLD | NEW |