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

Side by Side Diff: PRESUBMIT.py

Issue 9071009: Fix bugs in PRESUBMIT.py's file exclusions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 11 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) 2011 The Chromium Authors. All rights reserved. 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 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
11 11
12 import re 12 import re
13 13
14 14
15 _EXCLUDED_PATHS = ( 15 _EXCLUDED_PATHS = (
16 r"^breakpad[\\\/].*", 16 r"^breakpad[\\\/].*",
17 r"^net/tools/spdyshark/[\\\/].*", 17 r"^native_client_sdk[\\\/].*",
18 r"^net[\\\/]tools[\\\/]spdyshark[\\\/].*",
18 r"^skia[\\\/].*", 19 r"^skia[\\\/].*",
19 r"^v8[\\\/].*", 20 r"^v8[\\\/].*",
20 r".*MakeFile$", 21 r".*MakeFile$",
21 ) 22 )
22 23
23 24
24 _TEST_ONLY_WARNING = ( 25 _TEST_ONLY_WARNING = (
25 'You might be calling functions intended only for testing from\n' 26 'You might be calling functions intended only for testing from\n'
26 'production code. It is OK to ignore this warning if you know what\n' 27 'production code. It is OK to ignore this warning if you know what\n'
27 'you are doing, as the heuristics used to detect the situation are\n' 28 'you are doing, as the heuristics used to detect the situation are\n'
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 def GetPreferredTrySlaves(project, change): 336 def GetPreferredTrySlaves(project, change):
336 only_objc_files = all( 337 only_objc_files = all(
337 f.LocalPath().endswith(('.mm', '.m')) for f in change.AffectedFiles()) 338 f.LocalPath().endswith(('.mm', '.m')) for f in change.AffectedFiles())
338 if only_objc_files: 339 if only_objc_files:
339 return ['mac_rel'] 340 return ['mac_rel']
340 preferred = ['win_rel', 'linux_rel', 'mac_rel'] 341 preferred = ['win_rel', 'linux_rel', 'mac_rel']
341 aura_re = '_aura[^/]*[.][^/]*' 342 aura_re = '_aura[^/]*[.][^/]*'
342 if any(re.search(aura_re, f.LocalPath()) for f in change.AffectedFiles()): 343 if any(re.search(aura_re, f.LocalPath()) for f in change.AffectedFiles()):
343 preferred.append('linux_chromeos_aura:compile') 344 preferred.append('linux_chromeos_aura:compile')
344 return preferred 345 return preferred
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