Index: PRESUBMIT.py |
diff --git a/PRESUBMIT.py b/PRESUBMIT.py |
index 824421596e899292805e891c038b59ce152c2d07..ebe39d5831c495d235df94e7755673dde8de525c 100644 |
--- a/PRESUBMIT.py |
+++ b/PRESUBMIT.py |
@@ -308,10 +308,26 @@ 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/', '^ipc/', '^net/', '^sql/', '^jingle/', |
M-A Ruel
2012/03/01 21:21:40
Can you put them one per line in sorted order?
|
+ '^content/', '^media/', |
+ '^build/common.gypi$') |
+ # 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): |
M-A Ruel
2012/03/01 21:21:40
if any(
all(re.search(r, f) for f in affected_
|
+ 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 |