| 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 14 matching lines...) Expand all Loading... |
| 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(chromium_src_dir, 'tools', 'telemetry') |
| 32 return [ | 32 return [ |
| 33 telemetry_dir, | 33 telemetry_dir, |
| 34 input_api.os_path.join(telemetry_dir, 'third_party', 'mock'), | 34 input_api.os_path.join(telemetry_dir, 'third_party', 'mock'), |
| 35 input_api.os_path.join(chromium_src_dir, 'build', 'android'), |
| 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: |
| 42 # TODO: The cloud_storage module is in telemetry. | 43 # TODO: The cloud_storage module is in telemetry. |
| 43 sys.path = [os.path.join('..', 'telemetry')] + sys.path | 44 sys.path = [os.path.join('..', 'telemetry')] + sys.path |
| 44 from catapult_base import cloud_storage | 45 from catapult_base import cloud_storage |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 bots_string = ';'.join(bots) | 130 bots_string = ';'.join(bots) |
| 130 description = original_description | 131 description = original_description |
| 131 description += '\nCQ_EXTRA_TRYBOTS=%s' % bots_string | 132 description += '\nCQ_EXTRA_TRYBOTS=%s' % bots_string |
| 132 results.append(output_api.PresubmitNotifyResult( | 133 results.append(output_api.PresubmitNotifyResult( |
| 133 'Automatically added Perf trybots to run Telemetry benchmarks on CQ.')) | 134 'Automatically added Perf trybots to run Telemetry benchmarks on CQ.')) |
| 134 | 135 |
| 135 if description != original_description: | 136 if description != original_description: |
| 136 rietveld_obj.update_description(issue, description) | 137 rietveld_obj.update_description(issue, description) |
| 137 | 138 |
| 138 return results | 139 return results |
| OLD | NEW |