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

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

Issue 1135863003: [Android] Remove isolate_deps_dir after files have been pushed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/base/base_setup.py ('k') | build/android/pylib/instrumentation/setup.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 GTests.""" 5 """Generates test runner factory and tests for GTests."""
6 # pylint: disable=W0212 6 # pylint: disable=W0212
7 7
8 import logging 8 import logging
9 import os 9 import os
10 import sys 10 import sys
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 if not os.path.exists(exe_test_package.suite_path): 200 if not os.path.exists(exe_test_package.suite_path):
201 raise Exception( 201 raise Exception(
202 'Did not find %s target. Ensure it has been built.\n' 202 'Did not find %s target. Ensure it has been built.\n'
203 '(not found at %s or %s)' 203 '(not found at %s or %s)'
204 % (test_options.suite_name, 204 % (test_options.suite_name,
205 test_package.suite_path, 205 test_package.suite_path,
206 exe_test_package.suite_path)) 206 exe_test_package.suite_path))
207 test_package = exe_test_package 207 test_package = exe_test_package
208 logging.warning('Found target %s', test_package.suite_path) 208 logging.warning('Found target %s', test_package.suite_path)
209 209
210 base_setup.GenerateDepsDirUsingIsolate(test_options.suite_name, 210 i = base_setup.GenerateDepsDirUsingIsolate(test_options.suite_name,
211 test_options.isolate_file_path, 211 test_options.isolate_file_path,
212 ISOLATE_FILE_PATHS, 212 ISOLATE_FILE_PATHS,
213 DEPS_EXCLUSION_LIST) 213 DEPS_EXCLUSION_LIST)
214 def push_data_deps_to_device_dir(device): 214 def push_data_deps_to_device_dir(device):
215 device_dir = (constants.TEST_EXECUTABLE_DIR 215 device_dir = (constants.TEST_EXECUTABLE_DIR
216 if test_package.suite_name == 'breakpad_unittests' 216 if test_package.suite_name == 'breakpad_unittests'
217 else device.GetExternalStoragePath()) 217 else device.GetExternalStoragePath())
218 base_setup.PushDataDeps(device, device_dir, test_options) 218 base_setup.PushDataDeps(device, device_dir, test_options)
219 device_utils.DeviceUtils.parallel(devices).pMap(push_data_deps_to_device_dir) 219 device_utils.DeviceUtils.parallel(devices).pMap(push_data_deps_to_device_dir)
220 if i:
221 i.Clear()
220 222
221 tests = _GetTests(test_options, test_package, devices) 223 tests = _GetTests(test_options, test_package, devices)
222 224
223 # Constructs a new TestRunner with the current options. 225 # Constructs a new TestRunner with the current options.
224 def TestRunnerFactory(device, _shard_index): 226 def TestRunnerFactory(device, _shard_index):
225 return test_runner.TestRunner( 227 return test_runner.TestRunner(
226 test_options, 228 test_options,
227 device, 229 device,
228 test_package) 230 test_package)
229 231
230 if test_options.run_disabled: 232 if test_options.run_disabled:
231 test_options = test_options._replace( 233 test_options = test_options._replace(
232 test_arguments=('%s --gtest_also_run_disabled_tests' % 234 test_arguments=('%s --gtest_also_run_disabled_tests' %
233 test_options.test_arguments)) 235 test_options.test_arguments))
234 else: 236 else:
235 tests = _FilterDisabledTests(tests, test_options.suite_name, 237 tests = _FilterDisabledTests(tests, test_options.suite_name,
236 bool(test_options.gtest_filter)) 238 bool(test_options.gtest_filter))
237 if test_options.gtest_filter: 239 if test_options.gtest_filter:
238 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) 240 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter)
239 241
240 # Coalesce unit tests into a single test per device 242 # Coalesce unit tests into a single test per device
241 if (test_options.suite_name != 'content_browsertests' and 243 if (test_options.suite_name != 'content_browsertests' and
242 test_options.suite_name != 'components_browsertests'): 244 test_options.suite_name != 'components_browsertests'):
243 num_devices = len(devices) 245 num_devices = len(devices)
244 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] 246 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)]
245 tests = [t for t in tests if t] 247 tests = [t for t in tests if t]
246 248
247 return (TestRunnerFactory, tests) 249 return (TestRunnerFactory, tests)
OLDNEW
« no previous file with comments | « build/android/pylib/base/base_setup.py ('k') | build/android/pylib/instrumentation/setup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698