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

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

Issue 18770008: [Android] Redesigns the sharder to allow replicated vs distributed tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-adds -f short form to gtest_filter switch 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/test_runner.py ('k') | build/android/pylib/uiautomator/setup.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
deleted file mode 100644
index fafb2ac7ccf8360292effe1d1200f9d8a58a2645..0000000000000000000000000000000000000000
--- a/build/android/pylib/uiautomator/dispatch.py
+++ /dev/null
@@ -1,57 +0,0 @@
-# Copyright (c) 2013 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Dispatches the uiautomator tests."""
-
-import logging
-import os
-
-from pylib import android_commands
-from pylib import constants
-from pylib.base import base_test_result
-from pylib.base import shard
-from pylib.utils import report_results
-
-import test_package
-import test_runner
-
-
-def Dispatch(options):
- """Dispatches uiautomator tests onto 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.
-
- Args:
- options: Command line options.
-
- Returns:
- A tuple of (base_test_result.TestRunResults object, exit code)
-
- Raises:
- Exception: when there are no attached devices.
- """
- test_pkg = test_package.TestPackage(
- options.uiautomator_jar, options.uiautomator_info_jar)
- tests = test_pkg._GetAllMatchingTests(
- options.annotations, options.exclude_annotations, options.test_filter)
- if not tests:
- 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)
« no previous file with comments | « build/android/pylib/instrumentation/test_runner.py ('k') | build/android/pylib/uiautomator/setup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698