diff options
-rw-r--r-- | PRESUBMIT.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 8244215..b34d3f3 100644 --- a/PRESUBMIT.py +++ b/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 |