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

Side by Side Diff: build/android/pylib/instrumentation/test_jar.py

Issue 144183004: Convert to gtest-style filtering in instrumentation tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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
« no previous file with comments | « build/android/pylib/host_driven/test_info_collection.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 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 """Helper class for instrumenation test jar.""" 5 """Helper class for instrumenation test jar."""
6 6
7 import collections 7 import collections
8 import logging 8 import logging
9 import os 9 import os
10 import pickle 10 import pickle
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 available_tests = list(set(available_tests) - set(excluded_tests)) 202 available_tests = list(set(available_tests) - set(excluded_tests))
203 else: 203 else:
204 available_tests = [m for m in self.GetTestMethods() 204 available_tests = [m for m in self.GetTestMethods()
205 if not self.IsHostDrivenTest(m)] 205 if not self.IsHostDrivenTest(m)]
206 206
207 tests = [] 207 tests = []
208 if test_filter: 208 if test_filter:
209 # |available_tests| are in adb instrument format: package.path.class#test. 209 # |available_tests| are in adb instrument format: package.path.class#test.
210 filter_without_hash = test_filter.replace('#', '.') 210 filter_without_hash = test_filter.replace('#', '.')
211 tests = [t for t in available_tests 211 tests = [t for t in available_tests
212 if filter_without_hash in t.replace('#', '.')] 212 if re.search(filter_without_hash, t.replace('#', '.'))]
frankf 2014/01/22 18:43:11 The test filter includes '.' in package names whic
213 else: 213 else:
214 tests = available_tests 214 tests = available_tests
215 215
216 return tests 216 return tests
217 217
218 @staticmethod 218 @staticmethod
219 def IsHostDrivenTest(test): 219 def IsHostDrivenTest(test):
220 return 'pythonDrivenTests' in test 220 return 'pythonDrivenTests' in test
OLDNEW
« no previous file with comments | « build/android/pylib/host_driven/test_info_collection.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698