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

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

Issue 18444004: Makes host driven tests use the common sharder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes calls to Dispatch and the RunTests functions Created 7 years, 5 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/instrumentation/dispatch.py ('k') | build/android/run_monkey_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/uiautomator/dispatch.py
diff --git a/build/android/pylib/uiautomator/dispatch.py b/build/android/pylib/uiautomator/dispatch.py
index fafb2ac7ccf8360292effe1d1200f9d8a58a2645..349958859a4f52705c1eeb9513f71dc947958440 100644
--- a/build/android/pylib/uiautomator/dispatch.py
+++ b/build/android/pylib/uiautomator/dispatch.py
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-"""Dispatches the uiautomator tests."""
+"""Runs the uiautomator tests."""
import logging
import os
@@ -17,8 +17,8 @@ import test_package
import test_runner
-def Dispatch(options):
- """Dispatches uiautomator tests onto connected device(s).
+def RunUIAutomatorTests(options):
+ """Runs uiautomator tests on connected device(s).
If possible, this method will attempt to shard the tests to
all connected devices. Otherwise, dispatch and run tests on one device.
@@ -40,18 +40,9 @@ def Dispatch(options):
logging.error('No uiautomator tests to run with current args.')
return (base_test_result.TestRunResults(), constants.ERROR_EXIT_CODE)
- attached_devices = android_commands.GetAttachedDevices()
- if not attached_devices:
- raise Exception('There are no devices online.')
-
- if options.test_device:
- assert options.test_device in attached_devices
- attached_devices = [options.test_device]
-
def TestRunnerFactory(device, shard_index):
return test_runner.TestRunner(
options, device, shard_index, test_pkg, [])
- return shard.ShardAndRunTests(TestRunnerFactory, attached_devices,
- tests, options.build_type,
- num_retries=options.num_retries)
+ return dispatch.Dispatch(options, tests, TestRunnerFactory,
+ distribution='shard')
« no previous file with comments | « build/android/pylib/instrumentation/dispatch.py ('k') | build/android/run_monkey_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698