OLD | NEW |
---|---|
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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
301 input_api, output_api)) | 301 input_api, output_api)) |
302 results.extend(_CheckSubversionConfig(input_api, output_api)) | 302 results.extend(_CheckSubversionConfig(input_api, output_api)) |
303 return results | 303 return results |
304 | 304 |
305 | 305 |
306 def GetPreferredTrySlaves(project, change): | 306 def GetPreferredTrySlaves(project, change): |
307 affected_files = change.LocalPaths() | 307 affected_files = change.LocalPaths() |
308 only_objc_files = all(f.endswith(('.mm', '.m')) for f in affected_files) | 308 only_objc_files = all(f.endswith(('.mm', '.m')) for f in affected_files) |
309 if only_objc_files: | 309 if only_objc_files: |
310 return ['mac_rel'] | 310 return ['mac_rel'] |
311 preferred = ['win_rel', 'linux_rel', 'mac_rel'] | 311 preferred = ['win_rel', 'linux_rel', 'mac_rel', 'android'] |
M-A Ruel
2012/02/23 01:04:25
To give you an idea, right now there's 5 (5pm MTV
| |
312 if any(f.endswith(('.h', '.cc', '.cpp', '.cxx')) for f in affected_files): | 312 if any(f.endswith(('.h', '.cc', '.cpp', '.cxx')) for f in affected_files): |
313 preferred.append('linux_clang') | 313 preferred.append('linux_clang') |
314 aura_re = '_aura[^/]*[.][^/]*' | 314 aura_re = '_aura[^/]*[.][^/]*' |
315 if any(re.search(aura_re, f) for f in affected_files): | 315 if any(re.search(aura_re, f) for f in affected_files): |
316 preferred.append('linux_chromeos') | 316 preferred.append('linux_chromeos') |
317 # For bringup (staging of upstream work) we must be careful to not | |
318 # overload Android infrastructure. Keeping Android try decisions in a | |
319 # single location (instead of adding conditionals in base/, net/, ...) | |
320 # will help us avoid doing so. For example, we are starting off with | |
321 # 2 trybots (compared against ~45 for Mac and Linux). | |
322 # If any file matches something compiled on the main waterfall | |
323 # android builder, use the android try server. | |
324 android_re_list = ('^base/', '^ipc/', '^net/', '^sql/', '^jingle/', | |
325 '^build/common.gypi$') | |
326 for f in affected_files: | |
327 if any(re.search(r, f) for r in android_re_list): | |
328 preferred.append('android') | |
329 break | |
330 return preferred | 317 return preferred |
OLD | NEW |