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

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

Issue 745793002: Add AMP support to test runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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', 'appurify-python', 'src'))
18 import appurify.api
19 import appurify.utils
20
21 class RemoteDeviceGtestRun(remote_device_test_run.RemoteDeviceTestRun):
22 """Run gtests and uirobot tests on a remote device."""
23
24 DEFAULT_RUNNER_TYPE = 'robotium'
25 DEFAULT_RUNNER_PACKAGE = (
26 'org.chromium.native_test.ChromiumNativeTestInstrumentationTestRunner')
27
28 def TestPackage(self):
29 pass
30
31 #override
32 def _TriggerSetUp(self):
33 """Set up the triggering of a test run."""
34 self._app_id = self._UploadAppToDevice(self._test_instance.apk)
35
36 if not self._env.runner_type:
37 runner_type = self.DEFAULT_RUNNER_TYPE
38 logging.debug('Using default runner type: %s', self.DEFAULT_RUNNER_TYPE)
jbudorick 2014/12/05 21:35:12 nit: log this at info level
rnephew (Reviews Here) 2014/12/05 21:46:28 Done.
39 else:
40 runner_type = self._env.runner_type
41
42 if not self._env.runner_package:
43 runner_package = self.DEFAULT_RUNNER_PACKAGE
44 logging.debug('Using default runner package: %s',
jbudorick 2014/12/05 21:35:12 nit: log this at info level (debug only gets trigg
rnephew (Reviews Here) 2014/12/05 21:46:28 Done.
45 self.DEFAULT_RUNNER_TYPE)
jbudorick 2014/12/05 21:35:12 nit: two more spaces
rnephew (Reviews Here) 2014/12/05 21:46:28 Done.
46 else:
47 runner_package = self._env.runner_package
48
49 self._test_id = self._UploadTestToDevice(runner_type)
50 config_body = {'runner': runner_package}
51 self._SetTestConfig(runner_type, config_body)
52
53 #override
54 def _ParseTestResults(self):
55 # TODO(rnephew): Populate test results object.
56 results = base_test_result.TestRunResults()
57 return results
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698