OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 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 import copy | 5 import copy |
6 import fnmatch | 6 import fnmatch |
7 import logging | 7 import logging |
8 import os | 8 import os |
9 | 9 |
10 from pylib import android_commands | 10 from pylib import android_commands |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 options.cleanup_test_files, | 148 options.cleanup_test_files, |
149 options.tool, | 149 options.tool, |
150 options.build_type, | 150 options.build_type, |
151 options.webkit, | 151 options.webkit, |
152 options.push_deps, | 152 options.push_deps, |
153 constants.GTEST_TEST_PACKAGE_NAME, | 153 constants.GTEST_TEST_PACKAGE_NAME, |
154 constants.GTEST_TEST_ACTIVITY_NAME, | 154 constants.GTEST_TEST_ACTIVITY_NAME, |
155 constants.GTEST_COMMAND_LINE_FILE) | 155 constants.GTEST_COMMAND_LINE_FILE) |
156 | 156 |
157 # Get tests and split them up based on the number of devices. | 157 # Get tests and split them up based on the number of devices. |
158 if options.gtest_filter: | 158 if options.test_filter: |
159 all_tests = [t for t in options.gtest_filter.split(':') if t] | 159 all_tests = [t for t in options.test_filter.split(':') if t] |
160 else: | 160 else: |
161 all_tests = GetAllEnabledTests(RunnerFactory, attached_devices) | 161 all_tests = GetAllEnabledTests(RunnerFactory, attached_devices) |
162 num_devices = len(attached_devices) | 162 num_devices = len(attached_devices) |
163 tests = [':'.join(all_tests[i::num_devices]) for i in xrange(num_devices)] | 163 tests = [':'.join(all_tests[i::num_devices]) for i in xrange(num_devices)] |
164 tests = [t for t in tests if t] | 164 tests = [t for t in tests if t] |
165 | 165 |
166 # Run tests. | 166 # Run tests. |
167 test_results = shard.ShardAndRunTests(RunnerFactory, attached_devices, tests, | 167 test_results = shard.ShardAndRunTests(RunnerFactory, attached_devices, tests, |
168 options.build_type, test_timeout=None, | 168 options.build_type, test_timeout=None, |
169 num_retries=options.num_retries) | 169 num_retries=options.num_retries) |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 failures = 0 | 214 failures = 0 |
215 for suite_name, suite_path in all_test_suites: | 215 for suite_name, suite_path in all_test_suites: |
216 # Give each test suite its own copy of options. | 216 # Give each test suite its own copy of options. |
217 test_options = copy.deepcopy(options) | 217 test_options = copy.deepcopy(options) |
218 test_options.test_suite = suite_path | 218 test_options.test_suite = suite_path |
219 failures += _RunATestSuite(test_options, suite_name) | 219 failures += _RunATestSuite(test_options, suite_name) |
220 | 220 |
221 if options.use_xvfb: | 221 if options.use_xvfb: |
222 framebuffer.Stop() | 222 framebuffer.Stop() |
223 return failures | 223 return failures |
OLD | NEW |