| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 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 """Top-level presubmit script for buildbot. | 5 """Top-level presubmit script for buildbot. |
| 6 | 6 |
| 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for |
| 8 details on the presubmit API built into gcl. | 8 details on the presubmit API built into gcl. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 import sys | 11 import sys |
| 12 | 12 |
| 13 | 13 |
| 14 def CommonChecks(input_api, output_api): | 14 def CommonChecks(input_api, output_api): |
| 15 def join(*args): | 15 def join(*args): |
| 16 return input_api.os_path.join(input_api.PresubmitLocalPath(), *args) | 16 return input_api.os_path.join(input_api.PresubmitLocalPath(), *args) |
| 17 | 17 |
| 18 black_list = list(input_api.DEFAULT_BLACK_LIST) + [ | 18 black_list = list(input_api.DEFAULT_BLACK_LIST) + [ |
| 19 r'.*slave/.*/build.*/.*', | 19 r'.*slave/.*/build.*/.*', |
| 20 r'.*slave/.*/isolate.*/.*', | 20 r'.*slave/.*/isolate.*/.*', |
| 21 r'.*depot_tools/.*', | 21 r'.*depot_tools/.*', |
| 22 r'.*goma/.*', | 22 r'.*goma/.*', |
| 23 r'.*scripts/tools/buildbot_tool_templates/.*', |
| 23 r'.*scripts/release/.*', | 24 r'.*scripts/release/.*', |
| 24 r'.*scripts/slave/recipe_modules/.*', | 25 r'.*scripts/slave/recipe_modules/.*', |
| 25 r'.*scripts/gsd_generate_index/.*', | 26 r'.*scripts/gsd_generate_index/.*', |
| 26 r'.*masters/.*/templates/.*\.html$', | 27 r'.*masters/.*/templates/.*\.html$', |
| 27 r'.*masters/.*/templates/.*\.css$', | 28 r'.*masters/.*/templates/.*\.css$', |
| 28 r'.*masters/.*/public_html/.*\.html$', | 29 r'.*masters/.*/public_html/.*\.html$', |
| 29 r'.*masters/.*/public_html/.*\.css$', | 30 r'.*masters/.*/public_html/.*\.css$', |
| 30 ] | 31 ] |
| 31 tests = [] | 32 tests = [] |
| 32 sys_path_backup = sys.path | 33 sys_path_backup = sys.path |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 output = CommonChecks(input_api, output_api) | 157 output = CommonChecks(input_api, output_api) |
| 157 output.extend(BuildInternalCheck(output, input_api, output_api)) | 158 output.extend(BuildInternalCheck(output, input_api, output_api)) |
| 158 return output | 159 return output |
| 159 | 160 |
| 160 | 161 |
| 161 def CheckChangeOnCommit(input_api, output_api): | 162 def CheckChangeOnCommit(input_api, output_api): |
| 162 output = CommonChecks(input_api, output_api) | 163 output = CommonChecks(input_api, output_api) |
| 163 output.extend(ConditionalChecks(input_api, output_api)) | 164 output.extend(ConditionalChecks(input_api, output_api)) |
| 164 output.extend(BuildInternalCheck(output, input_api, output_api)) | 165 output.extend(BuildInternalCheck(output, input_api, output_api)) |
| 165 return output | 166 return output |
| OLD | NEW |