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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 | 278 |
279 logging.info('Charge level: %s%%', | 279 logging.info('Charge level: %s%%', |
280 str(self._device_battery.GetBatteryInfo().get('level'))) | 280 str(self._device_battery.GetBatteryInfo().get('level'))) |
281 if self._options.min_battery_level: | 281 if self._options.min_battery_level: |
282 self._device_battery.ChargeDeviceToLevel( | 282 self._device_battery.ChargeDeviceToLevel( |
283 self._options.min_battery_level) | 283 self._options.min_battery_level) |
284 | 284 |
285 logging.info('%s : %s', test_name, cmd) | 285 logging.info('%s : %s', test_name, cmd) |
286 start_time = time.time() | 286 start_time = time.time() |
287 | 287 |
288 timeout = self._tests['steps'][test_name].get('timeout', 5400) | 288 timeout = self._tests['steps'][test_name].get('timeout', 3600) |
289 if self._options.no_timeout: | 289 if self._options.no_timeout: |
290 timeout = None | 290 timeout = None |
291 logging.info('Timeout for %s test: %s', test_name, timeout) | 291 logging.info('Timeout for %s test: %s', test_name, timeout) |
292 full_cmd = cmd | 292 full_cmd = cmd |
293 if self._options.dry_run: | 293 if self._options.dry_run: |
294 full_cmd = 'echo %s' % cmd | 294 full_cmd = 'echo %s' % cmd |
295 | 295 |
296 logfile = sys.stdout | 296 logfile = sys.stdout |
297 if self._options.single_step: | 297 if self._options.single_step: |
298 # Just print a heart-beat so that the outer buildbot scripts won't timeout | 298 # Just print a heart-beat so that the outer buildbot scripts won't timeout |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 Returns: | 366 Returns: |
367 A tuple of (TestRunResults, retry). | 367 A tuple of (TestRunResults, retry). |
368 """ | 368 """ |
369 _, result_type = self._LaunchPerfTest(test_name) | 369 _, result_type = self._LaunchPerfTest(test_name) |
370 results = base_test_result.TestRunResults() | 370 results = base_test_result.TestRunResults() |
371 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) | 371 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) |
372 retry = None | 372 retry = None |
373 if not results.DidRunPass(): | 373 if not results.DidRunPass(): |
374 retry = test_name | 374 retry = test_name |
375 return results, retry | 375 return results, retry |
OLD | NEW |