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

Side by Side Diff: build/android/pylib/uiautomator/setup.py

Issue 1281923003: [Android] Add --blacklist-file as a command-line option. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix telemetry_unittests Created 5 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 unified diff | Download patch
« no previous file with comments | « build/android/pylib/perf/setup.py ('k') | build/android/pylib/utils/emulator.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Generates test runner factory and tests for uiautomator tests.""" 5 """Generates test runner factory and tests for uiautomator tests."""
6 6
7 import logging 7 import logging
8 8
9 from pylib.uiautomator import test_package 9 from pylib.uiautomator import test_package
10 from pylib.uiautomator import test_runner 10 from pylib.uiautomator import test_runner
11 11
12 12
13 def Setup(test_options): 13 def Setup(test_options, devices):
14 """Runs uiautomator tests on connected device(s). 14 """Runs uiautomator tests on connected device(s).
15 15
16 Args: 16 Args:
17 test_options: A UIAutomatorOptions object. 17 test_options: A UIAutomatorOptions object.
18 devices: The list of that tests will run on.
18 19
19 Returns: 20 Returns:
20 A tuple of (TestRunnerFactory, tests). 21 A tuple of (TestRunnerFactory, tests).
21 """ 22 """
22 test_pkg = test_package.TestPackage(test_options.uiautomator_jar, 23 test_pkg = test_package.TestPackage(test_options.uiautomator_jar,
23 test_options.uiautomator_info_jar) 24 test_options.uiautomator_info_jar)
24 tests = test_pkg.GetAllMatchingTests(test_options.annotations, 25 tests = test_pkg.GetAllMatchingTests(test_options.annotations,
25 test_options.exclude_annotations, 26 test_options.exclude_annotations,
26 test_options.test_filter) 27 test_options.test_filter,
28 devices)
27 29
28 if not tests: 30 if not tests:
29 logging.error('No uiautomator tests to run with current args.') 31 logging.error('No uiautomator tests to run with current args.')
30 32
31 def TestRunnerFactory(device, shard_index): 33 def TestRunnerFactory(device, shard_index):
32 return test_runner.TestRunner( 34 return test_runner.TestRunner(
33 test_options, device, shard_index, test_pkg) 35 test_options, device, shard_index, test_pkg)
34 36
35 return (TestRunnerFactory, tests) 37 return (TestRunnerFactory, tests)
OLDNEW
« no previous file with comments | « build/android/pylib/perf/setup.py ('k') | build/android/pylib/utils/emulator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698