| 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')
|
|
|