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 Chromium. | 5 """Top-level presubmit script for Chromium. |
6 | 6 |
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
8 for more details about the presubmit API built into gcl. | 8 for more details about the presubmit API built into gcl. |
9 """ | 9 """ |
10 | 10 |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 results.append(output_api.PresubmitPromptOrNotify( | 515 results.append(output_api.PresubmitPromptOrNotify( |
516 'You added one or more #includes of files that are temporarily\n' | 516 'You added one or more #includes of files that are temporarily\n' |
517 'allowed but being removed. Can you avoid introducing the\n' | 517 'allowed but being removed. Can you avoid introducing the\n' |
518 '#include? See relevant DEPS file(s) for details and contacts.', | 518 '#include? See relevant DEPS file(s) for details and contacts.', |
519 warning_descriptions)) | 519 warning_descriptions)) |
520 return results | 520 return results |
521 | 521 |
522 | 522 |
523 def _CheckFilePermissions(input_api, output_api): | 523 def _CheckFilePermissions(input_api, output_api): |
524 """Check that all files have their permissions properly set.""" | 524 """Check that all files have their permissions properly set.""" |
| 525 if input_api.platform == 'win32': |
| 526 return [] |
525 args = [sys.executable, 'tools/checkperms/checkperms.py', '--root', | 527 args = [sys.executable, 'tools/checkperms/checkperms.py', '--root', |
526 input_api.change.RepositoryRoot()] | 528 input_api.change.RepositoryRoot()] |
527 for f in input_api.AffectedFiles(): | 529 for f in input_api.AffectedFiles(): |
528 args += ['--file', f.LocalPath()] | 530 args += ['--file', f.LocalPath()] |
529 checkperms = input_api.subprocess.Popen(args, | 531 checkperms = input_api.subprocess.Popen(args, |
530 stdout=input_api.subprocess.PIPE) | 532 stdout=input_api.subprocess.PIPE) |
531 errors = checkperms.communicate()[0].strip() | 533 errors = checkperms.communicate()[0].strip() |
532 if errors: | 534 if errors: |
533 return [output_api.PresubmitError('checkperms.py failed.', | 535 return [output_api.PresubmitError('checkperms.py failed.', |
534 errors.splitlines())] | 536 errors.splitlines())] |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1456 trybots.extend(GetDefaultTryConfigs(['cros_x86'])) | 1458 trybots.extend(GetDefaultTryConfigs(['cros_x86'])) |
1457 | 1459 |
1458 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it | 1460 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it |
1459 # unless they're .gyp(i) files as changes to those files can break the gyp | 1461 # unless they're .gyp(i) files as changes to those files can break the gyp |
1460 # step on that bot. | 1462 # step on that bot. |
1461 if (not all(re.search('^chrome', f) for f in files) or | 1463 if (not all(re.search('^chrome', f) for f in files) or |
1462 any(re.search('\.gypi?$', f) for f in files)): | 1464 any(re.search('\.gypi?$', f) for f in files)): |
1463 trybots.extend(GetDefaultTryConfigs(['android_aosp'])) | 1465 trybots.extend(GetDefaultTryConfigs(['android_aosp'])) |
1464 | 1466 |
1465 return trybots | 1467 return trybots |
OLD | NEW |