Chromium Code Reviews| Index: build/android/pylib/browsertests/dispatch.py |
| diff --git a/build/android/pylib/browsertests/dispatch.py b/build/android/pylib/browsertests/dispatch.py |
| index 5d2f48d45e56cd2006e0e840b75d52938425b737..998916a692a5c201ed031e759d050dba5e355639 100644 |
| --- a/build/android/pylib/browsertests/dispatch.py |
| +++ b/build/android/pylib/browsertests/dispatch.py |
| @@ -55,8 +55,9 @@ def Dispatch(options): |
| if options.gtest_filter: |
| all_tests = [t for t in options.gtest_filter.split(':') if t] |
| else: |
| - all_tests = gtest_dispatch.GetAllEnabledTests(RunnerFactory, |
| - attached_devices) |
| + all_enabled = gtest_dispatch.GetAllEnabledTests(RunnerFactory, |
| + attached_devices) |
| + all_tests = _FilterTests(all_enabled) |
| # Run tests. |
| test_results = shard.ShardAndRunTests(RunnerFactory, attached_devices, |
| @@ -67,3 +68,18 @@ def Dispatch(options): |
| build_type=options.build_type, |
| flakiness_server=options.flakiness_dashboard_server) |
| test_results.PrintAnnotation() |
| + |
| +def _FilterTests(all_enabled_tests): |
| + """Filters out tests and fixtures starting with PRE_ and MANUAL_.""" |
| + return [t for t in all_enabled_tests if _ValidTest(t)] |
| + |
| +def _ValidTest(test): |
|
Yaron
2013/03/18 20:41:31
Instead of "Valid", call "Automatable"/Bot?
nilesh
2013/03/18 22:02:47
Renamed to _ShouldRunOnBot
|
| + fixture, case = test.split('.', 1) |
| + if _StartsWith(fixture, case, "PRE_"): |
| + return False |
| + if _StartsWith(fixture, case, "MANUAL_"): |
| + return False |
| + return True |
| + |
| +def _StartsWith(a, b, prefix): |
| + return a.startswith(prefix) or b.startswith(prefix) |