| OLD | NEW |
| 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 'tests', | 44 'tests', |
| 45 whitelist=[r'.*test\.py$'], | 45 whitelist=[r'.*test\.py$'], |
| 46 verbose=verbose)) | 46 verbose=verbose)) |
| 47 results.extend(RunGitClTests(input_api, output_api, verbose=verbose)) | 47 results.extend(RunGitClTests(input_api, output_api, verbose=verbose)) |
| 48 return results | 48 return results |
| 49 | 49 |
| 50 | 50 |
| 51 def RunGitClTests(input_api, output_api, verbose): | 51 def RunGitClTests(input_api, output_api, verbose): |
| 52 """Run all the shells scripts in the directory test. | 52 """Run all the shells scripts in the directory test. |
| 53 """ | 53 """ |
| 54 if input_api.platform == 'win32': |
| 55 # Skip for now as long as the test scripts are bash scripts. |
| 56 return [] |
| 57 |
| 54 # First loads a local Rietveld instance. | 58 # First loads a local Rietveld instance. |
| 55 import sys | 59 import sys |
| 56 old_sys_path = sys.path | 60 old_sys_path = sys.path |
| 57 try: | 61 try: |
| 58 sys.path = [input_api.PresubmitLocalPath()] + sys.path | 62 sys.path = [input_api.PresubmitLocalPath()] + sys.path |
| 59 from tests import local_rietveld # pylint: disable=W0403 | 63 from tests import local_rietveld # pylint: disable=W0403 |
| 60 server = local_rietveld.LocalRietveld() | 64 server = local_rietveld.LocalRietveld() |
| 61 finally: | 65 finally: |
| 62 sys.path = old_sys_path | 66 sys.path = old_sys_path |
| 63 | 67 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 return CommonChecks(input_api, output_api) | 100 return CommonChecks(input_api, output_api) |
| 97 | 101 |
| 98 | 102 |
| 99 def CheckChangeOnCommit(input_api, output_api): | 103 def CheckChangeOnCommit(input_api, output_api): |
| 100 output = [] | 104 output = [] |
| 101 output.extend(CommonChecks(input_api, output_api)) | 105 output.extend(CommonChecks(input_api, output_api)) |
| 102 output.extend(input_api.canned_checks.CheckDoNotSubmit( | 106 output.extend(input_api.canned_checks.CheckDoNotSubmit( |
| 103 input_api, | 107 input_api, |
| 104 output_api)) | 108 output_api)) |
| 105 return output | 109 return output |
| OLD | NEW |