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

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

Issue 23205011: [Android] Move getting the list of devices out of test_dispatcher. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated unit tests Created 7 years, 4 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/base/test_dispatcher_unittest.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/gtest/setup.py
diff --git a/build/android/pylib/gtest/setup.py b/build/android/pylib/gtest/setup.py
index 44fef19feb8405a2c9542d0f50a8c7e07636087d..f139c979081f2bd8c4841323414ddebe16e114d6 100644
--- a/build/android/pylib/gtest/setup.py
+++ b/build/android/pylib/gtest/setup.py
@@ -15,9 +15,7 @@ from pylib import android_commands
from pylib import cmd_helper
from pylib import constants
from pylib import ports
-from pylib.base import base_test_result
-import gtest_config
import test_package_apk
import test_package_exe
import test_runner
@@ -258,11 +256,12 @@ def _GetTestsFiltered(suite_name, gtest_filter, runner_factory, devices):
return tests
-def Setup(test_options):
+def Setup(test_options, devices):
"""Create the test runner factory and tests.
Args:
test_options: A GTestOptions object.
+ devices: A list of attached devices.
Returns:
A tuple of (TestRunnerFactory, tests).
@@ -290,12 +289,11 @@ def Setup(test_options):
device,
test_package)
- attached_devices = android_commands.GetAttachedDevices()
tests = _GetTestsFiltered(test_options.suite_name, test_options.gtest_filter,
- TestRunnerFactory, attached_devices)
+ TestRunnerFactory, devices)
# Coalesce unit tests into a single test per device
if test_options.suite_name != 'content_browsertests':
- num_devices = len(attached_devices)
+ num_devices = len(devices)
tests = [':'.join(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/base/test_dispatcher_unittest.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698