Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Side by Side Diff: build/android/pylib/perf/test_runner.py

Issue 1282563003: [Android] Convert RestartAdbd to DeviceUtils again. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add device test Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « build/android/pylib/device/device_utils_test.py ('k') | build/android/pylib/utils/test_environment.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698