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

Side by Side Diff: build/android/pylib/gtest/test_package.py

Issue 1359333003: [Android] Remove old gtest test_runner code. (RELAND) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: back out gtest_config removal Created 5 years, 3 months 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 (c) 2012 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 """Base class representing GTest test packages."""
6 # pylint: disable=R0201
7
8
9 class TestPackage(object):
10
11 """A helper base class for both APK and stand-alone executables.
12
13 Args:
14 suite_name: Name of the test suite (e.g. base_unittests).
15 """
16 def __init__(self, suite_name):
17 self.suite_name = suite_name
18 self.tool = None
19
20 def ClearApplicationState(self, device):
21 """Clears the application state.
22
23 Args:
24 device: Instance of DeviceUtils.
25 """
26 raise NotImplementedError('Method must be overridden.')
27
28 def CreateCommandLineFileOnDevice(self, device, test_filter, test_arguments):
29 """Creates a test runner script and pushes to the device.
30
31 Args:
32 device: Instance of DeviceUtils.
33 test_filter: A test_filter flag.
34 test_arguments: Additional arguments to pass to the test binary.
35 """
36 raise NotImplementedError('Method must be overridden.')
37
38 def GetAllTests(self, device):
39 """Returns a list of all tests available in the test suite.
40
41 Args:
42 device: Instance of DeviceUtils.
43 """
44 raise NotImplementedError('Method must be overridden.')
45
46 def GetGTestReturnCode(self, _device):
47 return None
48
49 def SpawnTestProcess(self, device):
50 """Spawn the test process.
51
52 Args:
53 device: Instance of DeviceUtils.
54
55 Returns:
56 An instance of pexpect spawn class.
57 """
58 raise NotImplementedError('Method must be overridden.')
59
60 def Install(self, device):
61 """Install the test package to the device.
62
63 Args:
64 device: Instance of DeviceUtils.
65 """
66 raise NotImplementedError('Method must be overridden.')
67
68 def PullAppFiles(self, device, files, directory):
69 """Pull application data from the device.
70
71 Args:
72 device: Instance of DeviceUtils.
73 files: A list of paths relative to the application data directory to
74 retrieve from the device.
75 directory: The host directory to which files should be pulled.
76 """
77 raise NotImplementedError('Method must be overridden.')
78
79 def SetPermissions(self, device):
80 pass
OLDNEW
« no previous file with comments | « build/android/pylib/gtest/test_options.py ('k') | build/android/pylib/gtest/test_package_apk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698