OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 """Runs perf tests. | 5 """Runs perf tests. |
6 | 6 |
7 Our buildbot infrastructure requires each slave to run steps serially. | 7 Our buildbot infrastructure requires each slave to run steps serially. |
8 This is sub-optimal for android, where these steps can run independently on | 8 This is sub-optimal for android, where these steps can run independently on |
9 multiple connected devices. | 9 multiple connected devices. |
10 | 10 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 (self._tests['steps'][test_name]['cmd'], | 243 (self._tests['steps'][test_name]['cmd'], |
244 self.device_serial)) | 244 self.device_serial)) |
245 | 245 |
246 if self._options.collect_chartjson_data: | 246 if self._options.collect_chartjson_data: |
247 self._output_dir = tempfile.mkdtemp() | 247 self._output_dir = tempfile.mkdtemp() |
248 cmd = cmd + ' --output-dir=%s' % self._output_dir | 248 cmd = cmd + ' --output-dir=%s' % self._output_dir |
249 | 249 |
250 logging.info('%s : %s', test_name, cmd) | 250 logging.info('%s : %s', test_name, cmd) |
251 start_time = datetime.datetime.now() | 251 start_time = datetime.datetime.now() |
252 | 252 |
253 timeout = 5400 | 253 timeout = self._tests['steps'][test_name].get('timeout', 5400) |
254 if self._options.no_timeout: | 254 if self._options.no_timeout: |
255 timeout = None | 255 timeout = None |
| 256 logging.info('Timeout for %s test: %s', test_name, timeout) |
256 full_cmd = cmd | 257 full_cmd = cmd |
257 if self._options.dry_run: | 258 if self._options.dry_run: |
258 full_cmd = 'echo %s' % cmd | 259 full_cmd = 'echo %s' % cmd |
259 | 260 |
260 logfile = sys.stdout | 261 logfile = sys.stdout |
261 if self._options.single_step: | 262 if self._options.single_step: |
262 # Just print a heart-beat so that the outer buildbot scripts won't timeout | 263 # Just print a heart-beat so that the outer buildbot scripts won't timeout |
263 # without response. | 264 # without response. |
264 logfile = _HeartBeatLogger() | 265 logfile = _HeartBeatLogger() |
265 cwd = os.path.abspath(constants.DIR_SOURCE_ROOT) | 266 cwd = os.path.abspath(constants.DIR_SOURCE_ROOT) |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 Returns: | 329 Returns: |
329 A tuple of (TestRunResults, retry). | 330 A tuple of (TestRunResults, retry). |
330 """ | 331 """ |
331 _, result_type = self._LaunchPerfTest(test_name) | 332 _, result_type = self._LaunchPerfTest(test_name) |
332 results = base_test_result.TestRunResults() | 333 results = base_test_result.TestRunResults() |
333 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) | 334 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) |
334 retry = None | 335 retry = None |
335 if not results.DidRunPass(): | 336 if not results.DidRunPass(): |
336 retry = test_name | 337 retry = test_name |
337 return results, retry | 338 return results, retry |
OLD | NEW |