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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 | 228 |
229 Returns: | 229 Returns: |
230 A tuple containing (Output, base_test_result.ResultType) | 230 A tuple containing (Output, base_test_result.ResultType) |
231 """ | 231 """ |
232 if not self._CheckDeviceAffinity(test_name): | 232 if not self._CheckDeviceAffinity(test_name): |
233 return '', base_test_result.ResultType.PASS | 233 return '', base_test_result.ResultType.PASS |
234 | 234 |
235 try: | 235 try: |
236 logging.warning('Unmapping device ports') | 236 logging.warning('Unmapping device ports') |
237 forwarder.Forwarder.UnmapAllDevicePorts(self.device) | 237 forwarder.Forwarder.UnmapAllDevicePorts(self.device) |
238 self.device.RestartAdbd() | 238 self.device.old_interface.RestartAdbdOnDevice() |
239 except Exception as e: | 239 except Exception as e: |
240 logging.error('Exception when tearing down device %s', e) | 240 logging.error('Exception when tearing down device %s', e) |
241 | 241 |
242 cmd = ('%s --device %s' % | 242 cmd = ('%s --device %s' % |
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 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 Returns: | 329 Returns: |
330 A tuple of (TestRunResults, retry). | 330 A tuple of (TestRunResults, retry). |
331 """ | 331 """ |
332 _, result_type = self._LaunchPerfTest(test_name) | 332 _, result_type = self._LaunchPerfTest(test_name) |
333 results = base_test_result.TestRunResults() | 333 results = base_test_result.TestRunResults() |
334 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) | 334 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) |
335 retry = None | 335 retry = None |
336 if not results.DidRunPass(): | 336 if not results.DidRunPass(): |
337 retry = test_name | 337 retry = test_name |
338 return results, retry | 338 return results, retry |
OLD | NEW |