Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[Backport] PRESUBMIT: Determine checkperms.py's path using input_api.
Browse files Browse the repository at this point in the history
This commit allows us to turn on the file permission checks in Crosswalk's
PRESUBMIT.py.

Original commit message:
------------------------
Like _GetIDLParseError(), use input_api.PresubmitLocalPath() to
determine checkperms.py's full path instead of just using
"tools/checkperms/checkperms.py".

While the latter works just fine for Chromium, using an absolute path
helps downstreams that may use Chromium's PRESUBMIT checks in their own
files.

[email protected],[email protected]

Review URL: https://codereview.chromium.org/1847373003
  • Loading branch information
raphael.kubo.da.costa committed Apr 4, 2016
1 parent 8222364 commit 123d118
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,10 @@ def _CheckFilePermissions(input_api, output_api):
"""Check that all files have their permissions properly set."""
if input_api.platform == 'win32':
return []
args = [input_api.python_executable, 'tools/checkperms/checkperms.py',
checkperms_tool = input_api.os_path.join(
input_api.PresubmitLocalPath(),
'tools', 'checkperms', 'checkperms.py')
args = [input_api.python_executable, checkperms_tool,
'--root', input_api.change.RepositoryRoot()]
for f in input_api.AffectedFiles():
args += ['--file', f.LocalPath()]
Expand Down

0 comments on commit 123d118

Please sign in to comment.