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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/chromedriver/test_environment.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/chromedriver/test_expectations
diff --git a/chrome/test/chromedriver/test_expectations b/chrome/test/chromedriver/test_expectations
index 6c591009f714822b515e8c2ee02bbdf67a2755cd..92dd84bbb49d7aa0c316a55a27e57e5bc43e74e6 100644
--- a/chrome/test/chromedriver/test_expectations
+++ b/chrome/test/chromedriver/test_expectations
@@ -177,3 +177,27 @@ def GetPassedJavaTestFilter(operating_system, chrome_version):
"""
return '*-' + ':'.join(_OS_NEGATIVE_FILTER[operating_system] +
_REVISION_NEGATIVE_FILTER[chrome_version])
+
+def ApplyJavaTestFilter(operating_system, chrome_version, tests):
+ """Applies the test filter to the given list of tests.
+
+ Args:
+ operating_system: The operating system, one of 'linux', 'mac', 'win', or
+ 'android'.
+ chrome_version: Chrome version to test against, e.g., 'HEAD' or '26'.
+ test: list of test names to filter.
+
+ Returns:
+ Set of passed test names.
+ """
+ filters = (_OS_NEGATIVE_FILTER[operating_system] +
+ _REVISION_NEGATIVE_FILTER[chrome_version])
+ passed = set(tests)
+ for f in filters:
+ passed.difference_update(set(t for t in tests if _TestMatchesFilter(t, f)))
+ return passed
+
+def _TestMatchesFilter(test, filter):
+ if '*' in filter:
+ return test[:len(filter) - 1] == test[:-1]
+ return test == filter
« 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