Chromium Code Reviews| 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 git cl. | 8 details on the presubmit API built into git cl. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 | 119 |
| 120 recipe_modules_tests = input_api.glob( | 120 recipe_modules_tests = input_api.glob( |
| 121 join('scripts', 'slave', 'recipe_modules', '*', 'tests')) | 121 join('scripts', 'slave', 'recipe_modules', '*', 'tests')) |
| 122 for path in recipe_modules_tests: | 122 for path in recipe_modules_tests: |
| 123 tests.extend(input_api.canned_checks.GetUnitTestsInDirectory( | 123 tests.extend(input_api.canned_checks.GetUnitTestsInDirectory( |
| 124 input_api, | 124 input_api, |
| 125 output_api, | 125 output_api, |
| 126 path, | 126 path, |
| 127 whitelist)) | 127 whitelist)) |
| 128 | 128 |
| 129 tests.extend(input_api.canned_checks.GetUnitTestsInDirectory( | |
| 130 input_api, | |
| 131 output_api, | |
| 132 input_api.os_path.join( | |
| 133 'slave', 'tests'), | |
|
dsansome
2016/10/12 03:54:04
I'd put this on the line above
ddoman1
2016/10/12 20:08:17
Done.
| |
| 134 whitelist)) | |
| 135 | |
| 129 with pythonpath(infra_path + sys.path): | 136 with pythonpath(infra_path + sys.path): |
| 130 import common.master_cfg_utils # pylint: disable=F0401 | 137 import common.master_cfg_utils # pylint: disable=F0401 |
| 131 # Fetch recipe dependencies once in serial so that we don't hit a race | 138 # Fetch recipe dependencies once in serial so that we don't hit a race |
| 132 # condition where multiple tests are trying to fetch at once. | 139 # condition where multiple tests are trying to fetch at once. |
| 133 output = input_api.RunTests([input_api.Command( | 140 output = input_api.RunTests([input_api.Command( |
| 134 name='recipes fetch', | 141 name='recipes fetch', |
| 135 cmd=[input_api.python_executable, | 142 cmd=[input_api.python_executable, |
| 136 input_api.os_path.join('scripts', 'slave', 'recipes.py'), 'fetch'], | 143 input_api.os_path.join('scripts', 'slave', 'recipes.py'), 'fetch'], |
| 137 kwargs={}, | 144 kwargs={}, |
| 138 message=output_api.PresubmitError, | 145 message=output_api.PresubmitError, |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 def CheckChangeOnUpload(input_api, output_api): | 190 def CheckChangeOnUpload(input_api, output_api): |
| 184 return [] # Try-jobs/commit-queue do a better job of testing, faster. | 191 return [] # Try-jobs/commit-queue do a better job of testing, faster. |
| 185 | 192 |
| 186 | 193 |
| 187 def CheckChangeOnCommit(input_api, output_api): | 194 def CheckChangeOnCommit(input_api, output_api): |
| 188 output = CommonChecks(input_api, output_api) | 195 output = CommonChecks(input_api, output_api) |
| 189 output.extend(ConditionalChecks(input_api, output_api)) | 196 output.extend(ConditionalChecks(input_api, output_api)) |
| 190 output.extend(CommitChecks(input_api, output_api)) | 197 output.extend(CommitChecks(input_api, output_api)) |
| 191 output.extend(BuildInternalCheck(output, input_api, output_api)) | 198 output.extend(BuildInternalCheck(output, input_api, output_api)) |
| 192 return output | 199 return output |
| OLD | NEW |