OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 import logging | 6 import logging |
7 import re | 7 import re |
8 import os | 8 import os |
9 | 9 |
10 from pylib import constants | 10 from pylib import constants |
(...skipping 26 matching lines...) Expand all Loading... |
37 self.test_suite.split(self.test_suite_basename)[0]) | 37 self.test_suite.split(self.test_suite_basename)[0]) |
38 self.cleanup_test_files = cleanup_test_files | 38 self.cleanup_test_files = cleanup_test_files |
39 self.tool = tool | 39 self.tool = tool |
40 if timeout == 0: | 40 if timeout == 0: |
41 timeout = 60 | 41 timeout = 60 |
42 # On a VM (e.g. chromium buildbots), this timeout is way too small. | 42 # On a VM (e.g. chromium buildbots), this timeout is way too small. |
43 if os.environ.get('BUILDBOT_SLAVENAME'): | 43 if os.environ.get('BUILDBOT_SLAVENAME'): |
44 timeout = timeout * 2 | 44 timeout = timeout * 2 |
45 self.timeout = timeout * self.tool.GetTimeoutScale() | 45 self.timeout = timeout * self.tool.GetTimeoutScale() |
46 | 46 |
| 47 def ClearApplicationState(self): |
| 48 """Clears the application state.""" |
| 49 raise NotImplementedError('Method must be overriden.') |
| 50 |
47 def GetDisabledPrefixes(self): | 51 def GetDisabledPrefixes(self): |
48 return ['DISABLED_', 'FLAKY_', 'FAILS_'] | 52 return ['DISABLED_', 'FLAKY_', 'FAILS_'] |
49 | 53 |
50 def _ParseGTestListTests(self, all_tests): | 54 def _ParseGTestListTests(self, all_tests): |
51 """Parses and filters the raw test lists. | 55 """Parses and filters the raw test lists. |
52 | 56 |
53 Args: | 57 Args: |
54 all_tests: The raw test listing with the following format: | 58 all_tests: The raw test listing with the following format: |
55 | 59 |
56 IPCChannelTest. | 60 IPCChannelTest. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 | 183 |
180 ret_code = self._GetGTestReturnCode() | 184 ret_code = self._GetGTestReturnCode() |
181 if ret_code: | 185 if ret_code: |
182 logging.critical( | 186 logging.critical( |
183 'gtest exit code: %d\npexpect.before: %s\npexpect.after: %s', | 187 'gtest exit code: %d\npexpect.before: %s\npexpect.after: %s', |
184 ret_code, p.before, p.after) | 188 ret_code, p.before, p.after) |
185 | 189 |
186 # Create TestResults and return | 190 # Create TestResults and return |
187 return TestResults.FromRun(ok=ok_tests, failed=failed_tests, | 191 return TestResults.FromRun(ok=ok_tests, failed=failed_tests, |
188 crashed=crashed_tests, timed_out=timed_out_tests) | 192 crashed=crashed_tests, timed_out=timed_out_tests) |
OLD | NEW |