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

Side by Side Diff: build/android/pylib/local/device/local_device_gtest_run.py

Issue 1412123008: Android GTest Runner: Handle test filters that start / end with : (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | 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 2014 The Chromium Authors. All rights reserved. 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 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 import imp 5 import imp
6 import itertools 6 import itertools
7 import os 7 import os
8 import posixpath 8 import posixpath
9 9
10 from devil.android import device_errors 10 from devil.android import device_errors
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 # wildcard comes at the end and there is at least one . to prove the scope is 84 # wildcard comes at the end and there is at least one . to prove the scope is
85 # not too large. 85 # not too large.
86 # This heuristic is not necessarily faster, but normally is. 86 # This heuristic is not necessarily faster, but normally is.
87 if len(patterns) == 1 and patterns[0].endswith('*'): 87 if len(patterns) == 1 and patterns[0].endswith('*'):
88 no_suffix = patterns[0].rstrip('*') 88 no_suffix = patterns[0].rstrip('*')
89 if '*' not in no_suffix and '.' in no_suffix: 89 if '*' not in no_suffix and '.' in no_suffix:
90 return patterns 90 return patterns
91 91
92 if '*' in gtest_filter: 92 if '*' in gtest_filter:
93 return None 93 return None
94 return patterns 94 return [p for p in patterns if p] # Ignore empty entries.
95 95
96 96
97 class _ApkDelegate(object): 97 class _ApkDelegate(object):
98 def __init__(self, test_instance): 98 def __init__(self, test_instance):
99 self._activity = test_instance.activity 99 self._activity = test_instance.activity
100 self._apk_helper = test_instance.apk_helper 100 self._apk_helper = test_instance.apk_helper
101 self._package = test_instance.package 101 self._package = test_instance.package
102 self._runner = test_instance.runner 102 self._runner = test_instance.runner
103 self._permissions = test_instance.permissions 103 self._permissions = test_instance.permissions
104 self._suite = test_instance.suite 104 self._suite = test_instance.suite
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 def TearDown(self): 354 def TearDown(self):
355 @local_device_test_run.handle_shard_failures 355 @local_device_test_run.handle_shard_failures
356 def individual_device_tear_down(dev): 356 def individual_device_tear_down(dev):
357 for s in self._servers.get(str(dev), []): 357 for s in self._servers.get(str(dev), []):
358 s.TearDown() 358 s.TearDown()
359 359
360 tool = self.GetTool(dev) 360 tool = self.GetTool(dev)
361 tool.CleanUpEnvironment() 361 tool.CleanUpEnvironment()
362 362
363 self._env.parallel_devices.pMap(individual_device_tear_down) 363 self._env.parallel_devices.pMap(individual_device_tear_down)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698