Update PRESUBMIT.py to be less likely to hit the android bot.
BUG=None TEST= Review URL: https://chromiumcodereview.appspot.com/9566028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124485 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
23
PRESUBMIT.py
23
PRESUBMIT.py
@ -308,10 +308,31 @@ def GetPreferredTrySlaves(project, change):
|
||||
only_objc_files = all(f.endswith(('.mm', '.m')) for f in affected_files)
|
||||
if only_objc_files:
|
||||
return ['mac_rel']
|
||||
preferred = ['win_rel', 'linux_rel', 'mac_rel', 'android']
|
||||
preferred = ['win_rel', 'linux_rel', 'mac_rel']
|
||||
if any(f.endswith(('.h', '.cc', '.cpp', '.cxx')) for f in affected_files):
|
||||
preferred.append('linux_clang')
|
||||
aura_re = '_aura[^/]*[.][^/]*'
|
||||
if any(re.search(aura_re, f) for f in affected_files):
|
||||
preferred.append('linux_chromeos')
|
||||
# Nothing in chrome/
|
||||
android_re_list = ('^base/',
|
||||
'^build/common.gypi$',
|
||||
'^content/',
|
||||
'^ipc/',
|
||||
'^jingle/',
|
||||
'^media/',
|
||||
'^net/',
|
||||
'^sql/')
|
||||
# Nothing that looks like win-only or aura-only
|
||||
win_re = '_win\.(cc|h)$'
|
||||
possibly_android = True
|
||||
for non_android_re in (aura_re, win_re):
|
||||
if all(re.search(non_android_re, f) for f in affected_files):
|
||||
possibly_android = False
|
||||
break
|
||||
if possibly_android:
|
||||
for f in change.AffectedFiles():
|
||||
if any(re.search(r, f.LocalPath()) for r in android_re_list):
|
||||
preferred.append('android')
|
||||
break
|
||||
return preferred
|
||||
|
Reference in New Issue
Block a user