diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-25 01:25:40 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-25 01:25:40 +0000 |
commit | 279d79f15246126b9fc7f9a8c8036d94cd2b9b3b (patch) | |
tree | 01b962ce3313ebce9697b6976f065d8685737628 /tools/checkperms | |
parent | be9cb978c720f69353ff93238f7b6a63f5ee8667 (diff) | |
download | chromium_src-279d79f15246126b9fc7f9a8c8036d94cd2b9b3b.zip chromium_src-279d79f15246126b9fc7f9a8c8036d94cd2b9b3b.tar.gz chromium_src-279d79f15246126b9fc7f9a8c8036d94cd2b9b3b.tar.bz2 |
Set svn:executable bit on scripts that are executable.
Add a PRESUBMIT.py to run checkperms.py when it is modified and to run pylint on it.
R=thestig@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/10134019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133835 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/checkperms')
-rw-r--r-- | tools/checkperms/PRESUBMIT.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/checkperms/PRESUBMIT.py b/tools/checkperms/PRESUBMIT.py new file mode 100644 index 0000000..c2f9356 --- /dev/null +++ b/tools/checkperms/PRESUBMIT.py @@ -0,0 +1,27 @@ +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Top-level presubmit script for checkperms. + +See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for +details on the presubmit API built into gcl. +""" + + +def CommonChecks(input_api, output_api): + output = [] + output.extend(input_api.canned_checks.RunPylint(input_api, output_api)) + # Run it like if it were a unit test. + output.extend( + input_api.canned_checks.RunUnitTests( + input_api, output_api, ['./checkperms.py'])) + return output + + +def CheckChangeOnUpload(input_api, output_api): + return CommonChecks(input_api, output_api) + + +def CheckChangeOnCommit(input_api, output_api): + return CommonChecks(input_api, output_api) |