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

Side by Side Diff: build/android/pylib/remote/device/remote_device_uirobot_run.py

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 """Run specific test on specific environment."""
6
7 import logging
8 import os
9 import sys
10
11 from pylib import constants
12 from pylib.base import base_test_result
13 from pylib.remote.device import remote_device_test_run
14 from pylib.remote.device import remote_device_helper
15
16 sys.path.append(os.path.join(
17 constants.DIR_SOURCE_ROOT, 'third_party', 'requests', 'src'))
18 sys.path.append(os.path.join(
19 constants.DIR_SOURCE_ROOT, 'third_party', 'appurify-python', 'src'))
20 import appurify.api
21 import appurify.utils
22
23 class RemoteDeviceUirobotRun(remote_device_test_run.RemoteDeviceTestRun):
24 """Run uirobot tests on a remote device."""
25
26 DEFAULT_RUNNER_TYPE = 'android_robot'
27
28 def __init__(self, env, test_instance):
29 """Constructor.
30
31 Args:
32 env: Environment the tests will run in.
33 test_instance: The test that will be run.
34 """
35 super(RemoteDeviceUirobotRun, self).__init__(env, test_instance)
36
37 def TestPackage(self):
38 pass
39
40 #override
41 def _TriggerSetUp(self):
42 """Set up the triggering of a test run."""
43 self._app_id = self._UploadAppToDevice(self._test_instance.apk_under_test)
44 if not self._env.runner_type:
45 runner_type = self.DEFAULT_RUNNER_TYPE
46 logging.info('Using default runner type: %s', self.DEFAULT_RUNNER_TYPE)
47 else:
48 runner_type = self._env.runner_type
49 self._test_id = self._GetTestByName(runner_type)
50 config_body = {'duration': self._test_instance.minutes}
51 self._SetTestConfig(runner_type, config_body)
52
53 #override
54 def _ParseTestResults(self):
55 # TODO(rnephew): Populate test results object.
56 results = remote_device_test_run.TestRunResults()
57 return results
58
OLDNEW
« 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