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

Unified Diff: build/android/pylib/uirobot/uirobot_test_instance.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
« no previous file with comments | « build/android/pylib/remote/device/remote_device_uirobot_test_run.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/uirobot/uirobot_test_instance.py
diff --git a/build/android/pylib/uirobot/uirobot_test_instance.py b/build/android/pylib/uirobot/uirobot_test_instance.py
index edd3200bed64ce243da73f618fbd5857e950f591..f73c569e619166b2959d8e18f1975b7990a562b0 100644
--- a/build/android/pylib/uirobot/uirobot_test_instance.py
+++ b/build/android/pylib/uirobot/uirobot_test_instance.py
@@ -10,18 +10,26 @@ from pylib.utils import apk_helper
class UirobotTestInstance(test_instance.TestInstance):
- def __init__(self, args):
+ def __init__(self, args, error_func):
"""Constructor.
Args:
args: Command line arguments.
"""
super(UirobotTestInstance, self).__init__()
- self._apk_under_test = os.path.join(
- constants.GetOutDirectory(), args.app_under_test)
+ if not args.app_under_test:
+ error_func('Must set --app-under-test.')
+ self._app_under_test = args.app_under_test
+
+ if args.device_type == 'Android':
+ self._suite = 'Android Uirobot'
+ self._package_name = apk_helper.GetPackageName(self._app_under_test)
+
+ elif args.device_type == 'iOS':
+ self._suite = 'iOS Uirobot'
+ self._package_name = self._app_under_test
+
self._minutes = args.minutes
- self._package_name = apk_helper.GetPackageName(self._apk_under_test)
- self._suite = 'Android Uirobot'
#override
def TestType(self):
@@ -39,9 +47,9 @@ class UirobotTestInstance(test_instance.TestInstance):
pass
@property
- def apk_under_test(self):
+ def app_under_test(self):
"""Returns the app to run the test on."""
- return self._apk_under_test
+ return self._app_under_test
@property
def minutes(self):
« no previous file with comments | « build/android/pylib/remote/device/remote_device_uirobot_test_run.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698