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

Side by Side Diff: PRESUBMIT.py

Issue 7465043: Add linux_clang to default try jobs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase against HEAD Created 8 years, 9 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 | « 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 gcl. 8 for more details about the presubmit API built into gcl.
9 """ 9 """
10 10
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 results.extend(_CheckSubversionConfig(input_api, output_api)) 303 results.extend(_CheckSubversionConfig(input_api, output_api))
304 return results 304 return results
305 305
306 306
307 def GetPreferredTrySlaves(project, change): 307 def GetPreferredTrySlaves(project, change):
308 affected_files = change.LocalPaths() 308 affected_files = change.LocalPaths()
309 only_objc_files = all(f.endswith(('.mm', '.m')) for f in affected_files) 309 only_objc_files = all(f.endswith(('.mm', '.m')) for f in affected_files)
310 if only_objc_files: 310 if only_objc_files:
311 return ['mac_rel'] 311 return ['mac_rel']
312 preferred = ['win_rel', 'linux_rel', 'mac_rel'] 312 preferred = ['win_rel', 'linux_rel', 'mac_rel']
313 preferred = ['win_rel', 'linux_rel', 'mac_rel', 'linux_clang']
313 if any(f.endswith(('.h', '.cc', '.cpp', '.cxx')) for f in affected_files): 314 if any(f.endswith(('.h', '.cc', '.cpp', '.cxx')) for f in affected_files):
314 preferred.append('linux_clang') 315 preferred.append('linux_clang')
315 aura_re = '_aura[^/]*[.][^/]*' 316 aura_re = '_aura[^/]*[.][^/]*'
316 if any(re.search(aura_re, f) for f in affected_files): 317 if any(re.search(aura_re, f) for f in affected_files):
317 preferred.append('linux_chromeos') 318 preferred.append('linux_chromeos')
318 # Nothing in chrome/ 319 # Nothing in chrome/
319 android_re_list = ('^base/', 320 android_re_list = ('^base/',
320 '^build/common.gypi$', 321 '^build/common.gypi$',
321 '^content/', 322 '^content/',
322 '^ipc/', 323 '^ipc/',
323 '^jingle/', 324 '^jingle/',
324 '^media/', 325 '^media/',
325 '^net/', 326 '^net/',
326 '^sql/') 327 '^sql/')
327 # Nothing that looks like win-only or aura-only 328 # Nothing that looks like win-only or aura-only
328 win_re = '_win\.(cc|h)$' 329 win_re = '_win\.(cc|h)$'
329 possibly_android = True 330 possibly_android = True
330 for non_android_re in (aura_re, win_re): 331 for non_android_re in (aura_re, win_re):
331 if all(re.search(non_android_re, f) for f in affected_files): 332 if all(re.search(non_android_re, f) for f in affected_files):
332 possibly_android = False 333 possibly_android = False
333 break 334 break
334 if possibly_android: 335 if possibly_android:
335 for f in change.AffectedFiles(): 336 for f in change.AffectedFiles():
336 if any(re.search(r, f.LocalPath()) for r in android_re_list): 337 if any(re.search(r, f.LocalPath()) for r in android_re_list):
337 preferred.append('android') 338 preferred.append('android')
338 break 339 break
339 return preferred 340 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