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

Side by Side Diff: build/android/pylib/remote/device/remote_device_environment.py

Issue 950893004: Add exit code for infra failures to testrunner script. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits. Created 5 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 """Environment setup and teardown for remote devices.""" 5 """Environment setup and teardown for remote devices."""
6 6
7 import distutils.version 7 import distutils.version
8 import json 8 import json
9 import logging 9 import logging
10 import os 10 import os
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 def _GetDeviceList(self): 295 def _GetDeviceList(self):
296 with appurify_sanitized.SanitizeLogging(self._verbose_count, 296 with appurify_sanitized.SanitizeLogging(self._verbose_count,
297 logging.WARNING): 297 logging.WARNING):
298 dev_list_res = appurify_sanitized.api.devices_list(self._access_token) 298 dev_list_res = appurify_sanitized.api.devices_list(self._access_token)
299 remote_device_helper.TestHttpResponse(dev_list_res, 299 remote_device_helper.TestHttpResponse(dev_list_res,
300 'Unable to generate access token.') 300 'Unable to generate access token.')
301 return dev_list_res.json()['response'] 301 return dev_list_res.json()['response']
302 302
303 def _NoDeviceFound(self): 303 def _NoDeviceFound(self):
304 self._PrintAvailableDevices(self._GetDeviceList()) 304 self._PrintAvailableDevices(self._GetDeviceList())
305 raise remote_device_helper.RemoteDeviceError('No device found.') 305 raise remote_device_helper.RemoteDeviceError(
306 'No device found.', is_infra_error=True)
306 307
307 @property 308 @property
308 def collect(self): 309 def collect(self):
309 return self._collect 310 return self._collect
310 311
311 @property 312 @property
312 def device_type_id(self): 313 def device_type_id(self):
313 return self._device['device_type_id'] 314 return self._device['device_type_id']
314 315
315 @property 316 @property
(...skipping 25 matching lines...) Expand all
341 def trigger(self): 342 def trigger(self):
342 return self._trigger 343 return self._trigger
343 344
344 @property 345 @property
345 def verbose_count(self): 346 def verbose_count(self):
346 return self._verbose_count 347 return self._verbose_count
347 348
348 @property 349 @property
349 def device_type(self): 350 def device_type(self):
350 return self._device_type 351 return self._device_type
OLDNEW
« no previous file with comments | « build/android/pylib/device/device_utils.py ('k') | build/android/pylib/remote/device/remote_device_helper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698