| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 modified_benchmarks.append(benchmark) | 161 modified_benchmarks.append(benchmark) |
| 162 return modified_benchmarks | 162 return modified_benchmarks |
| 163 | 163 |
| 164 def _checkout_revision(self, update_step, bot_db, revision=None): | 164 def _checkout_revision(self, update_step, bot_db, revision=None): |
| 165 """Checkouts specific revisions and updates bot_update step.""" | 165 """Checkouts specific revisions and updates bot_update step.""" |
| 166 if revision: | 166 if revision: |
| 167 if self.m.platform.is_win: # pragma: no cover | 167 if self.m.platform.is_win: # pragma: no cover |
| 168 self.m.chromium.taskkill() | 168 self.m.chromium.taskkill() |
| 169 self.m.gclient.c.revisions['src'] = str(revision) | 169 self.m.gclient.c.revisions['src'] = str(revision) |
| 170 update_step = self.m.bot_update.ensure_checkout( | 170 update_step = self.m.bot_update.ensure_checkout( |
| 171 suffix=str(revision), force=True, patch=False, | 171 suffix=str(revision), patch=False, update_presentation=False) |
| 172 update_presentation=False) | |
| 173 assert update_step.json.output['did_run'] | 172 assert update_step.json.output['did_run'] |
| 174 self.m.chromium.runhooks(name='runhooks on %s' % str(revision)) | 173 self.m.chromium.runhooks(name='runhooks on %s' % str(revision)) |
| 175 | 174 |
| 176 return update_step | 175 return update_step |
| 177 | 176 |
| 178 def _run_test(self, cfg, **kwargs): | 177 def _run_test(self, cfg, **kwargs): |
| 179 """Runs test from config and return results.""" | 178 """Runs test from config and return results.""" |
| 180 values, overall_output, retcodes = self.m.bisect_tester.run_test( | 179 values, overall_output, retcodes = self.m.bisect_tester.run_test( |
| 181 cfg, **kwargs) | 180 cfg, **kwargs) |
| 182 all_values = self.m.bisect_tester.digest_run_results(values, retcodes, cfg) | 181 all_values = self.m.bisect_tester.digest_run_results(values, retcodes, cfg) |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 | 505 |
| 507 def _prepend_src_to_path_in_command(test_cfg): | 506 def _prepend_src_to_path_in_command(test_cfg): |
| 508 command_to_run = [] | 507 command_to_run = [] |
| 509 for v in test_cfg.get('command').split(): | 508 for v in test_cfg.get('command').split(): |
| 510 if v in ['./tools/perf/run_benchmark', | 509 if v in ['./tools/perf/run_benchmark', |
| 511 'tools/perf/run_benchmark', | 510 'tools/perf/run_benchmark', |
| 512 'tools\\perf\\run_benchmark']: | 511 'tools\\perf\\run_benchmark']: |
| 513 v = 'src/tools/perf/run_benchmark' | 512 v = 'src/tools/perf/run_benchmark' |
| 514 command_to_run.append(v) | 513 command_to_run.append(v) |
| 515 test_cfg.update({'command': ' '.join(command_to_run)}) | 514 test_cfg.update({'command': ' '.join(command_to_run)}) |
| OLD | NEW |