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

Side by Side Diff: commit-queue/PRESUBMIT.py

Issue 135363007: Delete public commit queue to avoid confusion after move to internal repo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « commit-queue/DEPS ('k') | commit-queue/README » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 """Top-level presubmit script for commit-queue.
6
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
8 details on the presubmit API built into gcl.
9 """
10
11
12 def CommonChecks(input_api, output_api):
13 import sys
14 def join(*args):
15 return input_api.os_path.join(input_api.PresubmitLocalPath(), *args)
16
17 output = []
18
19 sys_path_backup = sys.path
20 try:
21 # Note that this won't work on the commit queue.
22 sys.path = [join('..', 'commit-queue-internal')] + sys.path
23 black_list = list(input_api.DEFAULT_BLACK_LIST) + [
24 r'^workdir/.*',
25 r'^tests/.+',
26 ]
27 output.extend(input_api.canned_checks.RunPylint(
28 input_api, output_api, black_list=black_list))
29
30 sys.path = [join('tests')] + sys.path
31 black_list = list(input_api.DEFAULT_BLACK_LIST) + [
32 r'^workdir/.*',
33 ]
34 white_list = [ r'tests/.+\.py$' ]
35 output.extend(input_api.canned_checks.RunPylint(
36 input_api, output_api, black_list=black_list, white_list=white_list))
37 finally:
38 sys.path = sys_path_backup
39
40 output.extend(input_api.canned_checks.RunUnitTestsInDirectory(
41 input_api, output_api, 'tests', whitelist=[r'.*_test\.py$']))
42 return output
43
44
45 def CheckChangeOnUpload(input_api, output_api):
46 return CommonChecks(input_api, output_api)
47
48
49 def CheckChangeOnCommit(input_api, output_api):
50 return CommonChecks(input_api, output_api)
OLDNEW
« no previous file with comments | « commit-queue/DEPS ('k') | commit-queue/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698