| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 """API for the perf try job recipe module. | 5 """API for the perf try job recipe module. |
| 6 | 6 |
| 7 This API is meant to enable the perf try job recipe on any chromium-supported | 7 This API is meant to enable the perf try job recipe on any chromium-supported |
| 8 platform for any test that can be run via buildbot, perf or otherwise. | 8 platform for any test that can be run via buildbot, perf or otherwise. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 self.m.chromium_android.clean_local_files() | 175 self.m.chromium_android.clean_local_files() |
| 176 compile_targets = None | 176 compile_targets = None |
| 177 else: | 177 else: |
| 178 # Removes any chrome temporary files or build.dead directories. | 178 # Removes any chrome temporary files or build.dead directories. |
| 179 self.m.chromium.cleanup_temp() | 179 self.m.chromium.cleanup_temp() |
| 180 | 180 |
| 181 if 'With Patch' in name: | 181 if 'With Patch' in name: |
| 182 self.m.chromium_tests.transient_check( | 182 self.m.chromium_tests.transient_check( |
| 183 update_step, | 183 update_step, |
| 184 lambda transform_name: self.m.chromium_tests.run_mb_and_compile( | 184 lambda transform_name: self.m.chromium_tests.run_mb_and_compile( |
| 185 compile_targets, None, name_suffix=transform_name(''))) | 185 compile_targets, None, name_suffix=transform_name(''), |
| 186 mb_mastername=mastername, mb_buildername=buildername)) |
| 186 else: | 187 else: |
| 187 self.m.chromium_tests.run_mb_and_compile( | 188 self.m.chromium_tests.run_mb_and_compile( |
| 188 compile_targets, None, name_suffix=' %s' % name) | 189 compile_targets, None, name_suffix=' %s' % name, |
| 190 mb_mastername=mastername, mb_buildername=buildername) |
| 189 | 191 |
| 190 def _run_test(self, cfg, **kwargs): | 192 def _run_test(self, cfg, **kwargs): |
| 191 """Runs test from config and return results.""" | 193 """Runs test from config and return results.""" |
| 192 values, overall_output, retcodes = self.m.bisect_tester.run_test( | 194 values, overall_output, retcodes = self.m.bisect_tester.run_test( |
| 193 cfg, **kwargs) | 195 cfg, **kwargs) |
| 194 all_values = self.m.bisect_tester.digest_run_results(values, retcodes, cfg) | 196 all_values = self.m.bisect_tester.digest_run_results(values, retcodes, cfg) |
| 195 overall_success = True | 197 overall_success = True |
| 196 if (not kwargs.get('allow_flakes', True) and | 198 if (not kwargs.get('allow_flakes', True) and |
| 197 cfg.get('test_type', 'perf') != 'return_code'): | 199 cfg.get('test_type', 'perf') != 'return_code'): |
| 198 overall_success = all(v == 0 for v in retcodes) | 200 overall_success = all(v == 0 for v in retcodes) |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 | 444 |
| 443 def _prepend_src_to_path_in_command(test_cfg): | 445 def _prepend_src_to_path_in_command(test_cfg): |
| 444 command_to_run = [] | 446 command_to_run = [] |
| 445 for v in test_cfg.get('command').split(): | 447 for v in test_cfg.get('command').split(): |
| 446 if v in ['./tools/perf/run_benchmark', | 448 if v in ['./tools/perf/run_benchmark', |
| 447 'tools/perf/run_benchmark', | 449 'tools/perf/run_benchmark', |
| 448 'tools\\perf\\run_benchmark']: | 450 'tools\\perf\\run_benchmark']: |
| 449 v = 'src/tools/perf/run_benchmark' | 451 v = 'src/tools/perf/run_benchmark' |
| 450 command_to_run.append(v) | 452 command_to_run.append(v) |
| 451 test_cfg.update({'command': ' '.join(command_to_run)}) | 453 test_cfg.update({'command': ' '.join(command_to_run)}) |
| OLD | NEW |