OLD | NEW |
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 92 |
93 if test_options.isolate_file_path: | 93 if test_options.isolate_file_path: |
94 base_setup.GenerateDepsDirUsingIsolate(test_options.test_apk, | 94 i = base_setup.GenerateDepsDirUsingIsolate(test_options.test_apk, |
95 test_options.isolate_file_path, | 95 test_options.isolate_file_path, |
96 ISOLATE_FILE_PATHS, | 96 ISOLATE_FILE_PATHS, |
97 DEPS_EXCLUSION_LIST) | 97 DEPS_EXCLUSION_LIST) |
98 def push_data_deps_to_device_dir(device): | 98 def push_data_deps_to_device_dir(device): |
99 base_setup.PushDataDeps(device, device.GetExternalStoragePath(), | 99 base_setup.PushDataDeps(device, device.GetExternalStoragePath(), |
100 test_options) | 100 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 if i: |
| 104 i.Clear() |
103 | 105 |
104 device_utils.DeviceUtils.parallel(devices).pMap( | 106 device_utils.DeviceUtils.parallel(devices).pMap( |
105 _PushExtraSuiteDataDeps, test_options.test_apk) | 107 _PushExtraSuiteDataDeps, test_options.test_apk) |
106 | 108 |
107 def TestRunnerFactory(device, shard_index): | 109 def TestRunnerFactory(device, shard_index): |
108 return test_runner.TestRunner(test_options, device, shard_index, | 110 return test_runner.TestRunner(test_options, device, shard_index, |
109 test_pkg) | 111 test_pkg) |
110 | 112 |
111 return (TestRunnerFactory, tests) | 113 return (TestRunnerFactory, tests) |
OLD | NEW |