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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 pylib import constants 10 from pylib import constants
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 tests = test_pkg.GetAllMatchingTests( 82 tests = test_pkg.GetAllMatchingTests(
83 test_options.annotations, 83 test_options.annotations,
84 test_options.exclude_annotations, 84 test_options.exclude_annotations,
85 test_options.test_filter) 85 test_options.test_filter)
86 if not tests: 86 if not tests:
87 logging.error('No instrumentation tests to run with current args.') 87 logging.error('No instrumentation tests to run with current args.')
88 88
89 if test_options.test_data: 89 if test_options.test_data:
90 device_utils.DeviceUtils.parallel(devices).pMap( 90 device_utils.DeviceUtils.parallel(devices).pMap(
91 _PushDataDeps, test_options) 91 _PushDataDeps, test_options)
92 else: 92
93 if test_options.isolate_file_path:
93 base_setup.GenerateDepsDirUsingIsolate(test_options.test_apk, 94 base_setup.GenerateDepsDirUsingIsolate(test_options.test_apk,
94 test_options.isolate_file_path, 95 test_options.isolate_file_path,
95 ISOLATE_FILE_PATHS, 96 ISOLATE_FILE_PATHS,
96 DEPS_EXCLUSION_LIST) 97 DEPS_EXCLUSION_LIST)
97 def push_data_deps_to_device_dir(device): 98 def push_data_deps_to_device_dir(device):
98 device_dir = os.path.join(device.GetExternalStoragePath(), 99 base_setup.PushDataDeps(device, device.GetExternalStoragePath(),
99 DEVICE_DATA_DIR) 100 test_options)
100 base_setup.PushDataDeps(device, device_dir, test_options)
101 device_utils.DeviceUtils.parallel(devices).pMap( 101 device_utils.DeviceUtils.parallel(devices).pMap(
102 push_data_deps_to_device_dir) 102 push_data_deps_to_device_dir)
103 103
104 device_utils.DeviceUtils.parallel(devices).pMap( 104 device_utils.DeviceUtils.parallel(devices).pMap(
105 _PushExtraSuiteDataDeps, test_options.test_apk) 105 _PushExtraSuiteDataDeps, test_options.test_apk)
106 106
107 def TestRunnerFactory(device, shard_index): 107 def TestRunnerFactory(device, shard_index):
108 return test_runner.TestRunner(test_options, device, shard_index, 108 return test_runner.TestRunner(test_options, device, shard_index,
109 test_pkg) 109 test_pkg)
110 110
111 return (TestRunnerFactory, tests) 111 return (TestRunnerFactory, tests)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698