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

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

Issue 1564583003: [Android] Add APK under test and additional APK support for the old mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | build/android/pylib/instrumentation/test_options.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 instrumentation tests.""" 5 """Generates test runner factory and tests for instrumentation tests."""
6 6
7 import logging 7 import logging
8 import os 8 import os
9 9
10 from devil.android import device_utils 10 from devil.android import device_utils
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 Args: 68 Args:
69 test_options: An InstrumentationOptions object. 69 test_options: An InstrumentationOptions object.
70 70
71 Returns: 71 Returns:
72 A tuple of (TestRunnerFactory, tests). 72 A tuple of (TestRunnerFactory, tests).
73 """ 73 """
74 if (test_options.coverage_dir and not 74 if (test_options.coverage_dir and not
75 os.path.exists(test_options.coverage_dir)): 75 os.path.exists(test_options.coverage_dir)):
76 os.makedirs(test_options.coverage_dir) 76 os.makedirs(test_options.coverage_dir)
77 77
78 test_pkg = test_package.TestPackage(test_options.test_apk_path, 78 test_pkg = test_package.TestPackage(
79 test_options.test_apk_jar_path, 79 test_options.test_apk_path,
80 test_options.test_support_apk_path) 80 test_options.test_apk_jar_path,
81 test_options.test_support_apk_path,
82 additional_apks=test_options.additional_apks,
83 apk_under_test=test_options.apk_under_test)
81 tests = test_pkg.GetAllMatchingTests( 84 tests = test_pkg.GetAllMatchingTests(
82 test_options.annotations, 85 test_options.annotations,
83 test_options.exclude_annotations, 86 test_options.exclude_annotations,
84 test_options.test_filter, 87 test_options.test_filter,
85 devices) 88 devices)
86 if not tests: 89 if not tests:
87 logging.error('No instrumentation tests to run with current args.') 90 logging.error('No instrumentation tests to run with current args.')
88 91
89 if test_options.test_data: 92 if test_options.test_data:
90 device_utils.DeviceUtils.parallel(devices).pMap( 93 device_utils.DeviceUtils.parallel(devices).pMap(
(...skipping 12 matching lines...) Expand all
103 isolator.Clear() 106 isolator.Clear()
104 107
105 device_utils.DeviceUtils.parallel(devices).pMap( 108 device_utils.DeviceUtils.parallel(devices).pMap(
106 _PushExtraSuiteDataDeps, test_options.test_apk) 109 _PushExtraSuiteDataDeps, test_options.test_apk)
107 110
108 def TestRunnerFactory(device, shard_index): 111 def TestRunnerFactory(device, shard_index):
109 return test_runner.TestRunner(test_options, device, shard_index, 112 return test_runner.TestRunner(test_options, device, shard_index,
110 test_pkg) 113 test_pkg)
111 114
112 return (TestRunnerFactory, tests) 115 return (TestRunnerFactory, tests)
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/instrumentation/test_options.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698