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 """Runs perf tests. | 5 """Runs perf tests. |
6 | 6 |
7 Our buildbot infrastructure requires each slave to run steps serially. | 7 Our buildbot infrastructure requires each slave to run steps serially. |
8 This is sub-optimal for android, where these steps can run independently on | 8 This is sub-optimal for android, where these steps can run independently on |
9 multiple connected devices. | 9 multiple connected devices. |
10 | 10 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 """A TestRunner instance runs a perf test on a single device. | 163 """A TestRunner instance runs a perf test on a single device. |
164 | 164 |
165 Args: | 165 Args: |
166 test_options: A PerfOptions object. | 166 test_options: A PerfOptions object. |
167 device: Device to run the tests. | 167 device: Device to run the tests. |
168 shard_index: the index of this device. | 168 shard_index: the index of this device. |
169 max_shards: the maximum shard index. | 169 max_shards: the maximum shard index. |
170 tests: a dict mapping test_name to command. | 170 tests: a dict mapping test_name to command. |
171 flaky_tests: a list of flaky test_name. | 171 flaky_tests: a list of flaky test_name. |
172 """ | 172 """ |
173 super(TestRunner, self).__init__(device, None, 'Release') | 173 super(TestRunner, self).__init__(device, None) |
174 self._options = test_options | 174 self._options = test_options |
175 self._shard_index = shard_index | 175 self._shard_index = shard_index |
176 self._max_shard = max_shard | 176 self._max_shard = max_shard |
177 self._tests = tests | 177 self._tests = tests |
178 self._flaky_tests = flaky_tests | 178 self._flaky_tests = flaky_tests |
179 self._output_dir = None | 179 self._output_dir = None |
180 | 180 |
181 @staticmethod | 181 @staticmethod |
182 def _IsBetter(result): | 182 def _IsBetter(result): |
183 if result['actual_exit_code'] == 0: | 183 if result['actual_exit_code'] == 0: |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 Returns: | 329 Returns: |
330 A tuple of (TestRunResults, retry). | 330 A tuple of (TestRunResults, retry). |
331 """ | 331 """ |
332 _, result_type = self._LaunchPerfTest(test_name) | 332 _, result_type = self._LaunchPerfTest(test_name) |
333 results = base_test_result.TestRunResults() | 333 results = base_test_result.TestRunResults() |
334 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) | 334 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) |
335 retry = None | 335 retry = None |
336 if not results.DidRunPass(): | 336 if not results.DidRunPass(): |
337 retry = test_name | 337 retry = test_name |
338 return results, retry | 338 return results, retry |
OLD | NEW |