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

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

Issue 1680233002: Android Add _incremental targets for instrumentation tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
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( 78 test_pkg = test_package.TestPackage(
79 test_options.test_apk_path, 79 test_options.test_apk_path,
80 test_options.test_apk_jar_path, 80 test_options.test_apk_jar_path,
81 test_options.test_support_apk_path, 81 test_options.test_support_apk_path,
82 additional_apks=test_options.additional_apks, 82 additional_apks=test_options.additional_apks,
83 apk_under_test=test_options.apk_under_test) 83 apk_under_test=test_options.apk_under_test,
84 test_apk_install_script=test_options.test_apk_install_script,
85 apk_under_test_install_script=test_options.apk_under_test_install_script)
84 tests = test_pkg.GetAllMatchingTests( 86 tests = test_pkg.GetAllMatchingTests(
85 test_options.annotations, 87 test_options.annotations,
86 test_options.exclude_annotations, 88 test_options.exclude_annotations,
87 test_options.test_filter, 89 test_options.test_filter,
88 devices) 90 devices)
89 if not tests: 91 if not tests:
90 logging.error('No instrumentation tests to run with current args.') 92 logging.error('No instrumentation tests to run with current args.')
91 93
92 if test_options.test_data: 94 if test_options.test_data:
93 device_utils.DeviceUtils.parallel(devices).pMap( 95 device_utils.DeviceUtils.parallel(devices).pMap(
(...skipping 12 matching lines...) Expand all
106 isolator.Clear() 108 isolator.Clear()
107 109
108 device_utils.DeviceUtils.parallel(devices).pMap( 110 device_utils.DeviceUtils.parallel(devices).pMap(
109 _PushExtraSuiteDataDeps, test_options.test_apk) 111 _PushExtraSuiteDataDeps, test_options.test_apk)
110 112
111 def TestRunnerFactory(device, shard_index): 113 def TestRunnerFactory(device, shard_index):
112 return test_runner.TestRunner(test_options, device, shard_index, 114 return test_runner.TestRunner(test_options, device, shard_index,
113 test_pkg) 115 test_pkg)
114 116
115 return (TestRunnerFactory, tests) 117 return (TestRunnerFactory, tests)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698