Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(496)

Side by Side Diff: PRESUBMIT.py

Issue 1943703002: 👟 Disable pydeps presumbit on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 depot_tools. 8 for more details about the presubmit API built into depot_tools.
9 """ 9 """
10 10
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 cmd = old_pydeps_data[1][1:].strip() 1599 cmd = old_pydeps_data[1][1:].strip()
1600 new_pydeps_data = self._input_api.subprocess.check_output( 1600 new_pydeps_data = self._input_api.subprocess.check_output(
1601 cmd + ' --output ""', shell=True) 1601 cmd + ' --output ""', shell=True)
1602 if old_pydeps_data[2:] != new_pydeps_data.splitlines()[2:]: 1602 if old_pydeps_data[2:] != new_pydeps_data.splitlines()[2:]:
1603 return cmd 1603 return cmd
1604 1604
1605 1605
1606 def _CheckPydepsNeedsUpdating(input_api, output_api, checker_for_tests=None): 1606 def _CheckPydepsNeedsUpdating(input_api, output_api, checker_for_tests=None):
1607 """Checks if a .pydeps file needs to be regenerated.""" 1607 """Checks if a .pydeps file needs to be regenerated."""
1608 # This check is mainly for Android, and involves paths not only in the 1608 # This check is mainly for Android, and involves paths not only in the
1609 # PRESUBMIT.py, but also in the .pydeps files. Just skip it for Windows. 1609 # PRESUBMIT.py, but also in the .pydeps files. It doesn't work on Windows and
1610 if input_api.platform == 'win32': 1610 # Mac, so skip it on other platforms.
1611 if input_api.platform != 'linux2':
1611 return [] 1612 return []
1612 # TODO(agrieve): Update when there's a better way to detect this: crbug/570091 1613 # TODO(agrieve): Update when there's a better way to detect this: crbug/570091
1613 is_android = input_api.os_path.exists('third_party/android_tools') 1614 is_android = input_api.os_path.exists('third_party/android_tools')
1614 pydeps_files = _ALL_PYDEPS_FILES if is_android else _GENERIC_PYDEPS_FILES 1615 pydeps_files = _ALL_PYDEPS_FILES if is_android else _GENERIC_PYDEPS_FILES
1615 results = [] 1616 results = []
1616 # First, check for new / deleted .pydeps. 1617 # First, check for new / deleted .pydeps.
1617 for f in input_api.AffectedFiles(include_deletes=True): 1618 for f in input_api.AffectedFiles(include_deletes=True):
1618 if f.LocalPath().endswith('.pydeps'): 1619 if f.LocalPath().endswith('.pydeps'):
1619 if f.Action() == 'D' and f.LocalPath() in _ALL_PYDEPS_FILES: 1620 if f.Action() == 'D' and f.LocalPath() in _ALL_PYDEPS_FILES:
1620 results.append(output_api.PresubmitError( 1621 results.append(output_api.PresubmitError(
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 results.extend(input_api.canned_checks.CheckTreeIsOpen( 2123 results.extend(input_api.canned_checks.CheckTreeIsOpen(
2123 input_api, 2124 input_api,
2124 output_api, 2125 output_api,
2125 json_url='http://chromium-status.appspot.com/current?format=json')) 2126 json_url='http://chromium-status.appspot.com/current?format=json'))
2126 2127
2127 results.extend(input_api.canned_checks.CheckChangeHasBugField( 2128 results.extend(input_api.canned_checks.CheckChangeHasBugField(
2128 input_api, output_api)) 2129 input_api, output_api))
2129 results.extend(input_api.canned_checks.CheckChangeHasDescription( 2130 results.extend(input_api.canned_checks.CheckChangeHasDescription(
2130 input_api, output_api)) 2131 input_api, output_api))
2131 return results 2132 return results
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698