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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
473 input_api, output_api)) | 473 input_api, output_api)) |
474 results.extend(input_api.canned_checks.CheckChangeHasDescription( | 474 results.extend(input_api.canned_checks.CheckChangeHasDescription( |
475 input_api, output_api)) | 475 input_api, output_api)) |
476 results.extend(_CheckSubversionConfig(input_api, output_api)) | 476 results.extend(_CheckSubversionConfig(input_api, output_api)) |
477 return results | 477 return results |
478 | 478 |
479 | 479 |
480 def GetPreferredTrySlaves(project, change): | 480 def GetPreferredTrySlaves(project, change): |
481 files = change.LocalPaths() | 481 files = change.LocalPaths() |
482 | 482 |
483 if not files: | |
John Grabowski
2012/06/28 22:48:41
unnecessary
John Grabowski
2012/06/28 22:51:29
Hmm... all([]) is True. Unexpected.
| |
484 return [] | |
485 | |
483 if all(re.search('\.(m|mm)$|[/_]mac[/_.]', f) for f in files): | 486 if all(re.search('\.(m|mm)$|[/_]mac[/_.]', f) for f in files): |
484 return ['mac_rel'] | 487 return ['mac_rel'] |
485 if all(re.search('[/_]win[/_.]', f) for f in files): | 488 if all(re.search('[/_]win[/_.]', f) for f in files): |
486 return ['win_rel'] | 489 return ['win_rel'] |
487 if all(re.search('[/_]android[/_.]', f) for f in files): | 490 if all(re.search('[/_]android[/_.]', f) for f in files): |
488 return ['android'] | 491 return ['android'] |
489 | 492 |
490 trybots = ['win_rel', 'linux_rel', 'mac_rel', 'linux_clang:compile'] | 493 trybots = ['win_rel', 'linux_rel', 'mac_rel', 'linux_clang:compile'] |
491 # match things like aurax11.cc or aura_oak.cc | 494 # match things like aurax11.cc or aura_oak.cc |
492 if any(re.search('[/_]aura', f) for f in files): | 495 if any(re.search('[/_]aura', f) for f in files): |
493 trybots.append('linux_chromeos') | 496 trybots.append('linux_chromeos') |
494 | 497 |
495 # Ensure CL contains some relevant files (i.e. not purely ^chrome) | 498 if not all(f.startswith('chrome/') for f in files): |
496 if any(re.search('^(base|build|content|ipc|jingle|media|net|sql)/', f) | |
497 for f in files): | |
498 trybots.append('android') | 499 trybots.append('android') |
499 | 500 |
500 return trybots | 501 return trybots |
OLD | NEW |