| 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 git cl. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 import contextlib | 11 import contextlib |
| 12 import sys | 12 import sys |
| 13 | 13 |
| 14 | 14 |
| 15 @contextlib.contextmanager | 15 @contextlib.contextmanager |
| 16 def pythonpath(path): | 16 def pythonpath(path): |
| 17 orig = sys.path | 17 orig = sys.path |
| 18 try: | 18 try: |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 def CheckChangeOnUpload(input_api, output_api): | 181 def CheckChangeOnUpload(input_api, output_api): |
| 182 return [] # Try-jobs/commit-queue do a better job of testing, faster. | 182 return [] # Try-jobs/commit-queue do a better job of testing, faster. |
| 183 | 183 |
| 184 | 184 |
| 185 def CheckChangeOnCommit(input_api, output_api): | 185 def CheckChangeOnCommit(input_api, output_api): |
| 186 output = CommonChecks(input_api, output_api) | 186 output = CommonChecks(input_api, output_api) |
| 187 output.extend(ConditionalChecks(input_api, output_api)) | 187 output.extend(ConditionalChecks(input_api, output_api)) |
| 188 output.extend(CommitChecks(input_api, output_api)) | 188 output.extend(CommitChecks(input_api, output_api)) |
| 189 output.extend(BuildInternalCheck(output, input_api, output_api)) | 189 output.extend(BuildInternalCheck(output, input_api, output_api)) |
| 190 return output | 190 return output |
| OLD | NEW |