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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 if options.gtest_filter: | 158 if options.gtest_filter: |
159 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] |
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 | 170 |
170 report_results.LogFull( | 171 report_results.LogFull( |
171 results=test_results, | 172 results=test_results, |
172 test_type='Unit test', | 173 test_type='Unit test', |
173 test_package=suite_name, | 174 test_package=suite_name, |
174 build_type=options.build_type, | 175 build_type=options.build_type, |
175 flakiness_server=options.flakiness_dashboard_server) | 176 flakiness_server=options.flakiness_dashboard_server) |
176 report_results.PrintAnnotation(test_results) | 177 report_results.PrintAnnotation(test_results) |
177 | 178 |
178 for buildbot_emulator in buildbot_emulators: | 179 for buildbot_emulator in buildbot_emulators: |
(...skipping 34 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 |