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

Unified Diff: build/android/pylib/remote/device/remote_device_uirobot_test_run.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_uirobot_test_run.py
diff --git a/build/android/pylib/remote/device/remote_device_uirobot_test_run.py b/build/android/pylib/remote/device/remote_device_uirobot_test_run.py
index 7eedaa5b9d0ecf69d9a9153e10b63b925ca20253..ed8db49c436f78033c575b0125bc7b4f7124f49a 100644
--- a/build/android/pylib/remote/device/remote_device_uirobot_test_run.py
+++ b/build/android/pylib/remote/device/remote_device_uirobot_test_run.py
@@ -18,7 +18,6 @@ from pylib.remote.device import remote_device_helper
class RemoteDeviceUirobotTestRun(remote_device_test_run.RemoteDeviceTestRun):
"""Run uirobot tests on a remote device."""
- DEFAULT_RUNNER_TYPE = 'android_robot'
def __init__(self, env, test_instance):
"""Constructor.
@@ -37,10 +36,19 @@ class RemoteDeviceUirobotTestRun(remote_device_test_run.RemoteDeviceTestRun):
def _TriggerSetUp(self):
"""Set up the triggering of a test run."""
logging.info('Triggering test run.')
- self._app_id = self._UploadAppToDevice(self._test_instance.apk_under_test)
+
+ if self._env.device_type == 'Android':
+ default_runner_type = 'android_robot'
+ elif self._env.device_type == 'iOS':
+ default_runner_type = 'ios_robot'
+ else:
+ raise remote_device_helper.RemoteDeviceError(
+ 'Unkown device type: %s' % self._env.device_type)
+
+ self._app_id = self._UploadAppToDevice(self._test_instance.app_under_test)
if not self._env.runner_type:
- runner_type = self.DEFAULT_RUNNER_TYPE
- logging.info('Using default runner type: %s', self.DEFAULT_RUNNER_TYPE)
+ runner_type = default_runner_type
+ logging.info('Using default runner type: %s', default_runner_type)
else:
runner_type = self._env.runner_type
self._test_id = self._GetTestByName(runner_type)
« no previous file with comments | « build/android/pylib/remote/device/remote_device_environment.py ('k') | build/android/pylib/uirobot/uirobot_test_instance.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698