| 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 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 join('scripts', 'slave', 'recipe_modules', '*', 'tests')) | 105 join('scripts', 'slave', 'recipe_modules', '*', 'tests')) |
| 106 for path in recipe_modules_tests: | 106 for path in recipe_modules_tests: |
| 107 tests.extend(input_api.canned_checks.GetUnitTestsInDirectory( | 107 tests.extend(input_api.canned_checks.GetUnitTestsInDirectory( |
| 108 input_api, | 108 input_api, |
| 109 output_api, | 109 output_api, |
| 110 path, | 110 path, |
| 111 whitelist)) | 111 whitelist)) |
| 112 | 112 |
| 113 try: | 113 try: |
| 114 sys.path = infra_path + sys.path | 114 sys.path = infra_path + sys.path |
| 115 import master_cfg_utils # pylint: disable=F0401 | 115 import common.master_cfg_utils # pylint: disable=F0401 |
| 116 # Run the tests. | 116 # Run the tests. |
| 117 with master_cfg_utils.TemporaryMasterPasswords(): | 117 with common.master_cfg_utils.TemporaryMasterPasswords(): |
| 118 output = input_api.RunTests(tests) | 118 output = input_api.RunTests(tests) |
| 119 | 119 |
| 120 output.extend(input_api.canned_checks.PanProjectChecks( | 120 output.extend(input_api.canned_checks.PanProjectChecks( |
| 121 input_api, output_api, excluded_paths=black_list)) | 121 input_api, output_api, excluded_paths=black_list)) |
| 122 return output | 122 return output |
| 123 finally: | 123 finally: |
| 124 sys.path = sys_path_backup | 124 sys.path = sys_path_backup |
| 125 | 125 |
| 126 | 126 |
| 127 def ConditionalChecks(input_api, output_api): | 127 def ConditionalChecks(input_api, output_api): |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 output.extend(BuildInternalCheck(output, input_api, output_api)) | 163 output.extend(BuildInternalCheck(output, input_api, output_api)) |
| 164 return output | 164 return output |
| 165 | 165 |
| 166 | 166 |
| 167 def CheckChangeOnCommit(input_api, output_api): | 167 def CheckChangeOnCommit(input_api, output_api): |
| 168 output = CommonChecks(input_api, output_api) | 168 output = CommonChecks(input_api, output_api) |
| 169 output.extend(ConditionalChecks(input_api, output_api)) | 169 output.extend(ConditionalChecks(input_api, output_api)) |
| 170 output.extend(CommitChecks(input_api, output_api)) | 170 output.extend(CommitChecks(input_api, output_api)) |
| 171 output.extend(BuildInternalCheck(output, input_api, output_api)) | 171 output.extend(BuildInternalCheck(output, input_api, output_api)) |
| 172 return output | 172 return output |
| OLD | NEW |