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

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 existing gtest filter evaluation code. Created 7 years, 7 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 | chrome/test/pylib/common/unittest_util.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..5dd9a7ccd0d97cd0a6539740548229fde236acff 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.CHROME_DIR, 'chrome', 'test', 'pylib'))
+from common import unittest_util
Paweł Hajdan Jr. 2013/05/16 18:26:28 This suggest things should be moved down to build
def Dispatch(options):
attached_devices = []
@@ -53,12 +56,12 @@ 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.FilterTests(all_enabled, options.gtest_filter)
frankf 2013/05/16 17:15:18 So we don't want to filter out PRE_ and MANUAL_ in
Paweł Hajdan Jr. 2013/05/16 18:26:28 Oh, why are you trying to duplicate test_launcher.
else:
- all_enabled = gtest_dispatch.GetAllEnabledTests(RunnerFactory,
- attached_devices)
all_tests = _FilterTests(all_enabled)
# Run tests.
« no previous file with comments | « no previous file | chrome/test/pylib/common/unittest_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698