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

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

Issue 872783003: Use upload test to get uirobot test id. (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_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/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 ed8db49c436f78033c575b0125bc7b4f7124f49a..936db0a45dffd6b10db17e62677888597da26dc2 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
@@ -51,10 +51,31 @@ class RemoteDeviceUirobotTestRun(remote_device_test_run.RemoteDeviceTestRun):
logging.info('Using default runner type: %s', default_runner_type)
else:
runner_type = self._env.runner_type
- self._test_id = self._GetTestByName(runner_type)
+
+ self._test_id = self._UploadTestToDevice(
+ 'android_robot', None, app_id=self._app_id)
config_body = {'duration': self._test_instance.minutes}
self._SetTestConfig(runner_type, config_body)
+
+ # TODO(rnephew): Switch to base class implementation when supported.
+ #override
+ def _UploadTestToDevice(self, test_type, test_path, app_id=None):
+ if test_path:
+ logging.info("Ignoring test path.")
+ data = {
+ 'access_token':self._env.token,
+ 'test_type':test_type,
+ 'app_id':app_id,
+ }
+ with appurify_sanitized.SanitizeLogging(self._env.verbose_count,
+ logging.WARNING):
+ test_upload_res = appurify_sanitized.utils.post('tests/upload',
+ data, None)
+ remote_device_helper.TestHttpResponse(
+ test_upload_res, 'Unable to get UiRobot test id.')
+ return test_upload_res.json()['response']['test_id']
+
#override
def _ParseTestResults(self):
logging.info('Parsing results from remote service.')
« no previous file with comments | « build/android/pylib/remote/device/remote_device_test_run.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698