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 depot tools. | 5 """Top-level presubmit script for depot tools. |
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 depot_tools. | 8 details on the presubmit API built into depot_tools. |
9 """ | 9 """ |
10 | 10 |
11 import fnmatch | 11 import fnmatch |
12 import os | 12 import os |
13 | 13 |
14 | 14 |
15 def CommonChecks(input_api, output_api, tests_to_black_list): | 15 def CommonChecks(input_api, output_api, tests_to_black_list): |
16 results = [] | 16 results = [] |
17 results.extend(input_api.canned_checks.CheckOwners(input_api, output_api)) | 17 results.extend(input_api.canned_checks.CheckOwners(input_api, output_api)) |
18 black_list = list(input_api.DEFAULT_BLACK_LIST) + [ | 18 black_list = list(input_api.DEFAULT_BLACK_LIST) + [ |
19 r'^\.recipe_deps[\/\\].*', | 19 r'^\.recipe_deps[\/\\].*', |
| 20 r'^infra[\/\\]\.recipe_deps[\/\\].*', |
20 r'^cpplint\.py$', | 21 r'^cpplint\.py$', |
21 r'^cpplint_chromium\.py$', | 22 r'^cpplint_chromium\.py$', |
22 r'^external_bin[\/\\].+', | 23 r'^external_bin[\/\\].+', |
23 r'^python[0-9]*_bin[\/\\].+', | 24 r'^python[0-9]*_bin[\/\\].+', |
24 r'^recipes\.py$', | 25 r'^recipes\.py$', |
25 r'^site-packages-py[0-9]\.[0-9][\/\\].+', | 26 r'^site-packages-py[0-9]\.[0-9][\/\\].+', |
26 r'^svn_bin[\/\\].+', | 27 r'^svn_bin[\/\\].+', |
27 r'^testing_support[\/\\]_rietveld[\/\\].+'] | 28 r'^testing_support[\/\\]_rietveld[\/\\].+'] |
28 if os.path.exists('.gitignore'): | 29 if os.path.exists('.gitignore'): |
29 with open('.gitignore') as fh: | 30 with open('.gitignore') as fh: |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 124 |
124 | 125 |
125 def CheckChangeOnCommit(input_api, output_api): | 126 def CheckChangeOnCommit(input_api, output_api): |
126 output = [] | 127 output = [] |
127 output.extend(CommonChecks(input_api, output_api, [])) | 128 output.extend(CommonChecks(input_api, output_api, [])) |
128 output.extend(input_api.canned_checks.CheckDoNotSubmit( | 129 output.extend(input_api.canned_checks.CheckDoNotSubmit( |
129 input_api, | 130 input_api, |
130 output_api)) | 131 output_api)) |
131 output.extend(RunGitClTests(input_api, output_api)) | 132 output.extend(RunGitClTests(input_api, output_api)) |
132 return output | 133 return output |
OLD | NEW |