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

Side by Side Diff: chrome/test/chromedriver/test_expectations

Issue 14130017: [chromedriver] Add option to relaunch the test harness after each java test for debugging. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed nits Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/chromedriver/test_environment.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 """Test expectation list for WebDriver Java acceptance tests. 5 """Test expectation list for WebDriver Java acceptance tests.
6 6
7 It is evaluated through Python. 7 It is evaluated through Python.
8 """ 8 """
9 9
10 _REVISION_NEGATIVE_FILTER = {} 10 _REVISION_NEGATIVE_FILTER = {}
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 Args: 170 Args:
171 operating_system: The operating system, one of 'linux', 'mac', 'win', or 171 operating_system: The operating system, one of 'linux', 'mac', 'win', or
172 'android'. 172 'android'.
173 chrome_version: Chrome version to test against, e.g., 'HEAD' or '26'. 173 chrome_version: Chrome version to test against, e.g., 'HEAD' or '26'.
174 174
175 Returns: 175 Returns:
176 Filter string, in Google Test (C++) format. 176 Filter string, in Google Test (C++) format.
177 """ 177 """
178 return '*-' + ':'.join(_OS_NEGATIVE_FILTER[operating_system] + 178 return '*-' + ':'.join(_OS_NEGATIVE_FILTER[operating_system] +
179 _REVISION_NEGATIVE_FILTER[chrome_version]) 179 _REVISION_NEGATIVE_FILTER[chrome_version])
180
181 def ApplyJavaTestFilter(operating_system, chrome_version, tests):
182 """Applies the test filter to the given list of tests.
183
184 Args:
185 operating_system: The operating system, one of 'linux', 'mac', 'win', or
186 'android'.
187 chrome_version: Chrome version to test against, e.g., 'HEAD' or '26'.
188 test: list of test names to filter.
189
190 Returns:
191 Set of passed test names.
192 """
193 filters = (_OS_NEGATIVE_FILTER[operating_system] +
194 _REVISION_NEGATIVE_FILTER[chrome_version])
195 passed = set(tests)
196 for f in filters:
197 passed.difference_update(set(t for t in tests if _TestMatchesFilter(t, f)))
198 return passed
199
200 def _TestMatchesFilter(test, filter):
201 if '*' in filter:
202 return test[:len(filter) - 1] == test[:-1]
203 return test == filter
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/test_environment.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698