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

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

Issue 12263024: Android: Add test runner scripts to run content_browsertests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Frank's comments and fixed typo in constants.py Created 7 years, 10 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 | « build/android/pylib/constants.py ('k') | build/android/pylib/gtest/test_package_apk.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/gtest/dispatch.py
diff --git a/build/android/pylib/gtest/dispatch.py b/build/android/pylib/gtest/dispatch.py
index 6fa2dbc0ee454896f8faa041bf9c1b634e9eb2f6..e40be2bea32a79c577954b0b653fa8c8bdd57601 100644
--- a/build/android/pylib/gtest/dispatch.py
+++ b/build/android/pylib/gtest/dispatch.py
@@ -9,9 +9,9 @@ import os
from pylib import android_commands
from pylib import cmd_helper
+from pylib import constants
from pylib import ports
from pylib.base import shard
-from pylib.base import test_result
from pylib.utils import emulator
from pylib.utils import xvfb
@@ -57,7 +57,7 @@ def _FullyQualifiedTestSuites(exe, option_test_suite, build_type):
return zip(all_test_suites, qualified_test_suites)
-def _GetTestsFromDevice(runner):
+def GetTestsFromDevice(runner):
"""Get a list of tests from a device, excluding disabled tests.
Args:
@@ -73,7 +73,7 @@ def _GetTestsFromDevice(runner):
all_tests)
-def _GetAllEnabledTests(runner_factory, devices):
+def GetAllEnabledTests(runner_factory, devices):
"""Get all enabled tests.
Obtains a list of enabled tests from the test package on the device,
@@ -92,7 +92,7 @@ def _GetAllEnabledTests(runner_factory, devices):
try:
logging.info('Obtaining tests from %s', device)
runner = runner_factory(device)
- return _GetTestsFromDevice(runner)
+ return GetTestsFromDevice(runner)
except Exception as e:
logging.warning('Failed obtaining tests from %s with exception: %s',
device, e)
@@ -145,13 +145,16 @@ def _RunATestSuite(options, suite_name):
options.cleanup_test_files,
options.tool,
options.build_type,
- options.webkit)
+ options.webkit,
+ constants.GTEST_TEST_PACKAGE_NAME,
+ constants.GTEST_TEST_ACTIVITY_NAME,
+ constants.GTEST_COMMAND_LINE_FILE)
# Get tests and split them up based on the number of devices.
if options.gtest_filter:
all_tests = [t for t in options.gtest_filter.split(':') if t]
else:
- all_tests = _GetAllEnabledTests(RunnerFactory, attached_devices)
+ all_tests = GetAllEnabledTests(RunnerFactory, attached_devices)
num_devices = len(attached_devices)
tests = [':'.join(all_tests[i::num_devices]) for i in xrange(num_devices)]
tests = [t for t in tests if t]
« no previous file with comments | « build/android/pylib/constants.py ('k') | build/android/pylib/gtest/test_package_apk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698