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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 if options.gtest_filter: | 157 if options.gtest_filter: |
158 all_tests = [t for t in options.gtest_filter.split(':') if t] | 158 all_tests = [t for t in options.gtest_filter.split(':') if t] |
159 else: | 159 else: |
160 all_tests = GetAllEnabledTests(RunnerFactory, attached_devices) | 160 all_tests = GetAllEnabledTests(RunnerFactory, attached_devices) |
161 num_devices = len(attached_devices) | 161 num_devices = len(attached_devices) |
162 tests = [':'.join(all_tests[i::num_devices]) for i in xrange(num_devices)] | 162 tests = [':'.join(all_tests[i::num_devices]) for i in xrange(num_devices)] |
163 tests = [t for t in tests if t] | 163 tests = [t for t in tests if t] |
164 | 164 |
165 # Run tests. | 165 # Run tests. |
166 test_results = shard.ShardAndRunTests(RunnerFactory, attached_devices, tests, | 166 test_results = shard.ShardAndRunTests(RunnerFactory, attached_devices, tests, |
167 options.build_type) | 167 options.build_type, test_timeout=None) |
168 | 168 |
169 report_results.LogFull( | 169 report_results.LogFull( |
170 results=test_results, | 170 results=test_results, |
171 test_type='Unit test', | 171 test_type='Unit test', |
172 test_package=suite_name, | 172 test_package=suite_name, |
173 build_type=options.build_type, | 173 build_type=options.build_type, |
174 flakiness_server=options.flakiness_dashboard_server) | 174 flakiness_server=options.flakiness_dashboard_server) |
175 report_results.PrintAnnotation(test_results) | 175 report_results.PrintAnnotation(test_results) |
176 | 176 |
177 for buildbot_emulator in buildbot_emulators: | 177 for buildbot_emulator in buildbot_emulators: |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 failures = 0 | 212 failures = 0 |
213 for suite_name, suite_path in all_test_suites: | 213 for suite_name, suite_path in all_test_suites: |
214 # Give each test suite its own copy of options. | 214 # Give each test suite its own copy of options. |
215 test_options = copy.deepcopy(options) | 215 test_options = copy.deepcopy(options) |
216 test_options.test_suite = suite_path | 216 test_options.test_suite = suite_path |
217 failures += _RunATestSuite(test_options, suite_name) | 217 failures += _RunATestSuite(test_options, suite_name) |
218 | 218 |
219 if options.use_xvfb: | 219 if options.use_xvfb: |
220 framebuffer.Stop() | 220 framebuffer.Stop() |
221 return failures | 221 return failures |
OLD | NEW |