OLD | NEW |
---|---|
(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.remote.device import remote_device_test_run | |
13 from pylib.remote.device import remote_device_helper | |
14 | |
15 sys.path.append(os.path.join( | |
16 constants.DIR_SOURCE_ROOT, 'third_party', 'appurify-python', 'src')) | |
17 import appurify.api | |
18 import appurify.utils | |
19 | |
20 class RemoteDeviceUirobotRun(remote_device_test_run.RemoteDeviceTestRun): | |
21 """Run gtests and uirobot tests on a remote device.""" | |
22 | |
23 DEFAULT_RUNNER_TYPE = 'android_robot' | |
24 | |
25 def __init__(self, env, test_instance): | |
26 """Constructor. | |
27 | |
28 Args: | |
29 env: Environment the tests will run in. | |
30 test_instance: The test that will be run. | |
31 """ | |
32 super(RemoteDeviceUirobotRun, self).__init__(env, test_instance) | |
33 | |
34 def TestPackage(self): | |
35 pass | |
36 | |
37 #override | |
38 def SetUp(self): | |
39 """Setup the test run.""" | |
40 if self._env.collect: | |
41 return | |
42 | |
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.debug('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 PackageTestResults(self): | |
55 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.
| |
56 | |
OLD | NEW |