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

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

Issue 2488453002: [android] Remove pylib/{remote,uirobot}. (Closed)
Patch Set: Remove remote_device_dummy_apk from rules.gni. Created 4 years, 1 month 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
deleted file mode 100644
index f99e685084b97b21a60a00ae5f298e54c7d3deb9..0000000000000000000000000000000000000000
--- a/build/android/pylib/remote/device/remote_device_uirobot_test_run.py
+++ /dev/null
@@ -1,85 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Run specific test on specific environment."""
-
-import logging
-
-from pylib.base import base_test_result
-from pylib.remote.device import appurify_sanitized
-from pylib.remote.device import remote_device_test_run
-from pylib.remote.device import remote_device_helper
-
-
-class RemoteDeviceUirobotTestRun(remote_device_test_run.RemoteDeviceTestRun):
- """Run uirobot tests on a remote device."""
-
-
- def __init__(self, env, test_instance):
- """Constructor.
-
- Args:
- env: Environment the tests will run in.
- test_instance: The test that will be run.
- """
- super(RemoteDeviceUirobotTestRun, self).__init__(env, test_instance)
-
- #override
- def TestPackage(self):
- return self._test_instance.package_name
-
- #override
- def _TriggerSetUp(self):
- """Set up the triggering of a test run."""
- logging.info('Triggering test run.')
-
- 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(
- 'Unknown 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 = default_runner_type
- logging.info('Using default runner type: %s', default_runner_type)
- else:
- runner_type = self._env.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.')
- results = base_test_result.TestRunResults()
- if self._results['results']['pass']:
- result_type = base_test_result.ResultType.PASS
- else:
- result_type = base_test_result.ResultType.FAIL
- results.AddResult(base_test_result.BaseTestResult('uirobot', result_type))
- return results
« no previous file with comments | « build/android/pylib/remote/device/remote_device_test_run.py ('k') | build/android/pylib/uirobot/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698