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

Unified Diff: build/android/pylib/remote/device/remote_device_environment.py

Issue 840393003: Add support for ios_uirobot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/remote/device/remote_device_environment.py
diff --git a/build/android/pylib/remote/device/remote_device_environment.py b/build/android/pylib/remote/device/remote_device_environment.py
index 3fdc716cff4989ec6fe415847f5dddd342d8f70a..a701d9541e6bae2b07497e1e6937339266d2ba81 100644
--- a/build/android/pylib/remote/device/remote_device_environment.py
+++ b/build/android/pylib/remote/device/remote_device_environment.py
@@ -65,6 +65,7 @@ class RemoteDeviceEnvironment(environment.Environment):
self._runner_type = args.runner_type
self._device = ''
self._verbose_count = args.verbose_count
+ self._device_type = args.device_type
self._timeouts = {
'queueing': 60 * 10,
'installing': 60 * 10,
@@ -147,7 +148,7 @@ class RemoteDeviceEnvironment(environment.Environment):
device_list = dev_list_res.json()['response']
random.shuffle(device_list)
for device in device_list:
- if device['os_name'] != 'Android':
+ if device['os_name'] != self._device_type:
continue
if self._remote_device and device['name'] != self._remote_device:
continue
@@ -169,9 +170,9 @@ class RemoteDeviceEnvironment(environment.Environment):
return c
return 0
- logging.critical('Available Android Devices:')
- android_devices = (d for d in device_list if d['os_name'] == 'Android')
- for d in sorted(android_devices, compare_devices):
+ logging.critical('Available %s Devices:', self._device_type)
+ devices = (d for d in device_list if d['os_name'] == self._device_type)
+ for d in sorted(devices, compare_devices):
logging.critical(' %s %s', d['os_version'].ljust(7), d['name'])
def _NoDeviceFound(self, device_list):
@@ -218,3 +219,7 @@ class RemoteDeviceEnvironment(environment.Environment):
@property
def verbose_count(self):
return self._verbose_count
+
+ @property
+ def device_type(self):
+ return self._device_type
« no previous file with comments | « build/android/pylib/constants.py ('k') | build/android/pylib/remote/device/remote_device_uirobot_test_run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698