| OLD | NEW |
| 1 # Copyright 2012 The Chromium Authors. All rights reserved. | 1 # Copyright 2012 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 """Presubmit script for changes affecting tools/perf/. | 5 """Presubmit script for changes affecting tools/perf/. |
| 6 | 6 |
| 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
| 8 for more details about the presubmit API built into depot_tools. | 8 for more details about the presubmit API built into depot_tools. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 results.extend(_CheckJson(input_api, output_api)) | 21 results.extend(_CheckJson(input_api, output_api)) |
| 22 results.extend(input_api.RunTests(input_api.canned_checks.GetPylint( | 22 results.extend(input_api.RunTests(input_api.canned_checks.GetPylint( |
| 23 input_api, output_api, extra_paths_list=_GetPathsToPrepend(input_api), | 23 input_api, output_api, extra_paths_list=_GetPathsToPrepend(input_api), |
| 24 pylintrc='pylintrc'))) | 24 pylintrc='pylintrc'))) |
| 25 return results | 25 return results |
| 26 | 26 |
| 27 | 27 |
| 28 def _GetPathsToPrepend(input_api): | 28 def _GetPathsToPrepend(input_api): |
| 29 perf_dir = input_api.PresubmitLocalPath() | 29 perf_dir = input_api.PresubmitLocalPath() |
| 30 chromium_src_dir = input_api.os_path.join(perf_dir, '..', '..') | 30 chromium_src_dir = input_api.os_path.join(perf_dir, '..', '..') |
| 31 telemetry_dir = input_api.os_path.join(chromium_src_dir, 'tools', 'telemetry') | 31 telemetry_dir = input_api.os_path.join( |
| 32 chromium_src_dir, 'third_party', 'catapult', 'telemetry') |
| 32 return [ | 33 return [ |
| 33 telemetry_dir, | 34 telemetry_dir, |
| 34 input_api.os_path.join(telemetry_dir, 'third_party', 'mock'), | 35 input_api.os_path.join(telemetry_dir, 'third_party', 'mock'), |
| 35 ] | 36 ] |
| 36 | 37 |
| 37 | 38 |
| 38 def _CheckWprShaFiles(input_api, output_api): | 39 def _CheckWprShaFiles(input_api, output_api): |
| 39 """Check whether the wpr sha files have matching URLs.""" | 40 """Check whether the wpr sha files have matching URLs.""" |
| 40 old_sys_path = sys.path | 41 old_sys_path = sys.path |
| 41 try: | 42 try: |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 bots_string = ';'.join(bots) | 132 bots_string = ';'.join(bots) |
| 132 description = original_description | 133 description = original_description |
| 133 description += '\nCQ_EXTRA_TRYBOTS=%s' % bots_string | 134 description += '\nCQ_EXTRA_TRYBOTS=%s' % bots_string |
| 134 results.append(output_api.PresubmitNotifyResult( | 135 results.append(output_api.PresubmitNotifyResult( |
| 135 'Automatically added Perf trybots to run Telemetry benchmarks on CQ.')) | 136 'Automatically added Perf trybots to run Telemetry benchmarks on CQ.')) |
| 136 | 137 |
| 137 if description != original_description: | 138 if description != original_description: |
| 138 rietveld_obj.update_description(issue, description) | 139 rietveld_obj.update_description(issue, description) |
| 139 | 140 |
| 140 return results | 141 return results |
| OLD | NEW |