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

Side by Side Diff: PRESUBMIT.py

Issue 9360028: Presubmit change to add android trybots when needed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « no previous file | build/all_android.gyp » ('j') | 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 335
336 def GetPreferredTrySlaves(project, change): 336 def GetPreferredTrySlaves(project, change):
337 only_objc_files = all( 337 only_objc_files = all(
338 f.LocalPath().endswith(('.mm', '.m')) for f in change.AffectedFiles()) 338 f.LocalPath().endswith(('.mm', '.m')) for f in change.AffectedFiles())
339 if only_objc_files: 339 if only_objc_files:
340 return ['mac_rel'] 340 return ['mac_rel']
341 preferred = ['win_rel', 'linux_rel', 'mac_rel'] 341 preferred = ['win_rel', 'linux_rel', 'mac_rel']
342 aura_re = '_aura[^/]*[.][^/]*' 342 aura_re = '_aura[^/]*[.][^/]*'
343 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()):
344 preferred.append('linux_chromeos') 344 preferred.append('linux_chromeos')
345 return preferred 345 return preferred + GetAndroidTrySlaves(project, change)
346
347 def GetAndroidTrySlaves(project, change):
M-A Ruel 2012/02/09 00:36:25 Don't make it a separate function please, just add
348 """Return list of Android slaves to use.
349
350 For bringup (staging of upstream work) we must be careful to not
351 overload Android infrastructure. Keeping Android try decisions in a
352 single location (instead of adding conditionals in base/, net/, ...)
353 will help us avoid doing so. For example, we are starting off with
354 2 trybots (compared against ~45 for Mac and Linux).
355 """
356 # If any file matches something compiled on the main waterfall
357 # android builder, use the android try server.
358 android_re_list = ('^base/', '^ipc/', '^net/', '^sql/', '^jingle/',
359 '^build/common.gypi$')
360 for f in change.AffectedFiles():
361 if any(re.search(r, f.LocalPath()) for r in android_re_list):
362 return ['android']
363 return []
OLDNEW
« no previous file with comments | « no previous file | build/all_android.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698