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

Unified Diff: build/android/pylib/browsertests/dispatch.py

Issue 14882007: Android: support glob-style gtest filters with content browser tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use DIR_SOURCE_ROOT. Created 7 years, 6 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 | « no previous file | build/util/lib/common/__init__.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/browsertests/dispatch.py
diff --git a/build/android/pylib/browsertests/dispatch.py b/build/android/pylib/browsertests/dispatch.py
index c598d6447bd88ef7fe621c4fb22f2b1a21e6404d..808c811224fd09ab4fd71554cd5a3679a117da93 100644
--- a/build/android/pylib/browsertests/dispatch.py
+++ b/build/android/pylib/browsertests/dispatch.py
@@ -4,6 +4,7 @@
import logging
import os
+import sys
from pylib import android_commands
from pylib import cmd_helper
@@ -14,7 +15,9 @@ from pylib.gtest import dispatch as gtest_dispatch
from pylib.gtest import test_runner
from pylib.utils import report_results
+sys.path.append(os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'util', 'lib'))
+from common import unittest_util
def Dispatch(options):
attached_devices = []
@@ -53,12 +56,13 @@ def Dispatch(options):
constants.BROWSERTEST_TEST_ACTIVITY_NAME,
constants.BROWSERTEST_COMMAND_LINE_FILE)
- # Get tests and split them up based on the number of devices.
+ # Get tests and split them up based on the number of devices.
+ all_enabled = gtest_dispatch.GetAllEnabledTests(RunnerFactory,
+ attached_devices)
if options.gtest_filter:
- all_tests = [t for t in options.gtest_filter.split(':') if t]
+ all_tests = unittest_util.FilterTestNames(all_enabled,
+ options.gtest_filter)
else:
- all_enabled = gtest_dispatch.GetAllEnabledTests(RunnerFactory,
- attached_devices)
all_tests = _FilterTests(all_enabled)
# Run tests.
« no previous file with comments | « no previous file | build/util/lib/common/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698