| 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 def RunnerFactory(device, shard_index): | 142 def RunnerFactory(device, shard_index): |
| 143 return test_runner.TestRunner( | 143 return test_runner.TestRunner( |
| 144 device, | 144 device, |
| 145 options.test_suite, | 145 options.test_suite, |
| 146 options.test_arguments, | 146 options.test_arguments, |
| 147 options.timeout, | 147 options.timeout, |
| 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 constants.GTEST_TEST_PACKAGE_NAME, | 153 constants.GTEST_TEST_PACKAGE_NAME, |
| 153 constants.GTEST_TEST_ACTIVITY_NAME, | 154 constants.GTEST_TEST_ACTIVITY_NAME, |
| 154 constants.GTEST_COMMAND_LINE_FILE) | 155 constants.GTEST_COMMAND_LINE_FILE) |
| 155 | 156 |
| 156 # 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. |
| 157 if options.gtest_filter: | 158 if options.gtest_filter: |
| 158 all_tests = [t for t in options.gtest_filter.split(':') if t] | 159 all_tests = [t for t in options.gtest_filter.split(':') if t] |
| 159 else: | 160 else: |
| 160 all_tests = GetAllEnabledTests(RunnerFactory, attached_devices) | 161 all_tests = GetAllEnabledTests(RunnerFactory, attached_devices) |
| 161 num_devices = len(attached_devices) | 162 num_devices = len(attached_devices) |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 failures = 0 | 214 failures = 0 |
| 214 for suite_name, suite_path in all_test_suites: | 215 for suite_name, suite_path in all_test_suites: |
| 215 # Give each test suite its own copy of options. | 216 # Give each test suite its own copy of options. |
| 216 test_options = copy.deepcopy(options) | 217 test_options = copy.deepcopy(options) |
| 217 test_options.test_suite = suite_path | 218 test_options.test_suite = suite_path |
| 218 failures += _RunATestSuite(test_options, suite_name) | 219 failures += _RunATestSuite(test_options, suite_name) |
| 219 | 220 |
| 220 if options.use_xvfb: | 221 if options.use_xvfb: |
| 221 framebuffer.Stop() | 222 framebuffer.Stop() |
| 222 return failures | 223 return failures |
| OLD | NEW |