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

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

Issue 788753002: [Android] Implement gtest and local in platform mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix findbugs + move log parsing up to GtestTestInstance 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
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Base class representing GTest test packages.""" 5 """Base class representing GTest test packages."""
6 # pylint: disable=R0201 6 # pylint: disable=R0201
7 7
8 8
9 class TestPackage(object): 9 class TestPackage(object):
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 raise NotImplementedError('Method must be overriden.') 57 raise NotImplementedError('Method must be overriden.')
58 58
59 def Install(self, device): 59 def Install(self, device):
60 """Install the test package to the device. 60 """Install the test package to the device.
61 61
62 Args: 62 Args:
63 device: Instance of DeviceUtils. 63 device: Instance of DeviceUtils.
64 """ 64 """
65 raise NotImplementedError('Method must be overriden.') 65 raise NotImplementedError('Method must be overriden.')
66 66
67 @staticmethod
68 def _ParseGTestListTests(raw_list):
69 """Parses a raw test list as provided by --gtest_list_tests.
70
71 Args:
72 raw_list: The raw test listing with the following format:
73
74 IPCChannelTest.
75 SendMessageInChannelConnected
76 IPCSyncChannelTest.
77 Simple
78 DISABLED_SendWithTimeoutMixedOKAndTimeout
79
80 Returns:
81 A list of all tests. For the above raw listing:
82
83 [IPCChannelTest.SendMessageInChannelConnected, IPCSyncChannelTest.Simple,
84 IPCSyncChannelTest.DISABLED_SendWithTimeoutMixedOKAndTimeout]
85 """
86 ret = []
87 current = ''
88 for test in raw_list:
89 if not test:
90 continue
91 if test[0] != ' ':
92 test_case = test.split()[0]
93 if test_case.endswith('.'):
94 current = test_case
95 elif not 'YOU HAVE' in test:
96 test_name = test.split()[0]
97 ret += [current + test_name]
98 return ret
OLDNEW
« no previous file with comments | « build/android/pylib/gtest/local_device_gtest_run.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