Chromium Code Reviews| Index: build/android/pylib/remote/device/remote_device_uirobot_run.py |
| diff --git a/build/android/pylib/remote/device/remote_device_uirobot_run.py b/build/android/pylib/remote/device/remote_device_uirobot_run.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..786a343199086e163c24537f4e953836255b5e1d |
| --- /dev/null |
| +++ b/build/android/pylib/remote/device/remote_device_uirobot_run.py |
| @@ -0,0 +1,56 @@ |
| +# 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 |
| +import os |
| +import sys |
| + |
| +from pylib import constants |
| +from pylib.remote.device import remote_device_test_run |
| +from pylib.remote.device import remote_device_helper |
| + |
| +sys.path.append(os.path.join( |
| + constants.DIR_SOURCE_ROOT, 'third_party', 'appurify-python', 'src')) |
| +import appurify.api |
| +import appurify.utils |
| + |
| +class RemoteDeviceUirobotRun(remote_device_test_run.RemoteDeviceTestRun): |
| + """Run gtests and uirobot tests on a remote device.""" |
| + |
| + DEFAULT_RUNNER_TYPE = 'android_robot' |
| + |
| + def __init__(self, env, test_instance): |
| + """Constructor. |
| + |
| + Args: |
| + env: Environment the tests will run in. |
| + test_instance: The test that will be run. |
| + """ |
| + super(RemoteDeviceUirobotRun, self).__init__(env, test_instance) |
| + |
| + def TestPackage(self): |
| + pass |
| + |
| + #override |
| + def SetUp(self): |
| + """Setup the test run.""" |
| + if self._env.collect: |
| + return |
| + |
| + self._app_id = self.UploadAppToDevice(self._test_instance.apk_under_test) |
| + if not self._env.runner_type: |
| + runner_type = self.DEFAULT_RUNNER_TYPE |
| + logging.debug('Using default runner type: %s', self.DEFAULT_RUNNER_TYPE) |
| + else: |
| + runner_type = self._env.runner_type |
| + self._test_id = self.GetTestByName(runner_type) |
| + config_body = {'duration': self._test_instance.minutes} |
| + self.SetTestConfig(runner_type, config_body) |
| + |
| + #override |
| + def PackageTestResults(self): |
| + pass |
|
jbudorick
2014/12/04 21:51:34
This should return something, even if it's an empt
rnephew (Reviews Here)
2014/12/04 23:16:50
Done.
|
| + |