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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 249 |
250 Returns: | 250 Returns: |
251 A tuple containing (Output, base_test_result.ResultType) | 251 A tuple containing (Output, base_test_result.ResultType) |
252 """ | 252 """ |
253 if not self._CheckDeviceAffinity(test_name): | 253 if not self._CheckDeviceAffinity(test_name): |
254 return '', base_test_result.ResultType.PASS | 254 return '', base_test_result.ResultType.PASS |
255 | 255 |
256 try: | 256 try: |
257 logging.warning('Unmapping device ports') | 257 logging.warning('Unmapping device ports') |
258 forwarder.Forwarder.UnmapAllDevicePorts(self.device) | 258 forwarder.Forwarder.UnmapAllDevicePorts(self.device) |
259 self.device.old_interface.RestartAdbdOnDevice() | 259 self.device.RestartAdbd() |
260 except Exception as e: | 260 except Exception as e: |
261 logging.error('Exception when tearing down device %s', e) | 261 logging.error('Exception when tearing down device %s', e) |
262 | 262 |
263 cmd = ('%s --device %s' % | 263 cmd = ('%s --device %s' % |
264 (self._tests['steps'][test_name]['cmd'], | 264 (self._tests['steps'][test_name]['cmd'], |
265 self.device_serial)) | 265 self.device_serial)) |
266 | 266 |
267 if self._options.collect_chartjson_data: | 267 if self._options.collect_chartjson_data: |
268 self._output_dir = tempfile.mkdtemp() | 268 self._output_dir = tempfile.mkdtemp() |
269 cmd = cmd + ' --output-dir=%s' % self._output_dir | 269 cmd = cmd + ' --output-dir=%s' % self._output_dir |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 Returns: | 363 Returns: |
364 A tuple of (TestRunResults, retry). | 364 A tuple of (TestRunResults, retry). |
365 """ | 365 """ |
366 _, result_type = self._LaunchPerfTest(test_name) | 366 _, result_type = self._LaunchPerfTest(test_name) |
367 results = base_test_result.TestRunResults() | 367 results = base_test_result.TestRunResults() |
368 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) | 368 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) |
369 retry = None | 369 retry = None |
370 if not results.DidRunPass(): | 370 if not results.DidRunPass(): |
371 retry = test_name | 371 retry = test_name |
372 return results, retry | 372 return results, retry |
OLD | NEW |