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 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 input_api, | 482 input_api, |
483 output_api, | 483 output_api, |
484 json_url='http://chromium-status.appspot.com/current?format=json')) | 484 json_url='http://chromium-status.appspot.com/current?format=json')) |
485 results.extend(input_api.canned_checks.CheckRietveldTryJobExecution(input_api, | 485 results.extend(input_api.canned_checks.CheckRietveldTryJobExecution(input_api, |
486 output_api, 'http://codereview.chromium.org', | 486 output_api, 'http://codereview.chromium.org', |
487 ('win_rel', 'linux_rel', 'mac_rel, win:compile'), | 487 ('win_rel', 'linux_rel', 'mac_rel, win:compile'), |
488 'tryserver@chromium.org')) | 488 'tryserver@chromium.org')) |
489 | 489 |
490 results.extend(input_api.canned_checks.CheckChangeHasBugField( | 490 results.extend(input_api.canned_checks.CheckChangeHasBugField( |
491 input_api, output_api)) | 491 input_api, output_api)) |
492 results.extend(input_api.canned_checks.CheckChangeHasTestField( | |
493 input_api, output_api)) | |
494 results.extend(input_api.canned_checks.CheckChangeHasDescription( | 492 results.extend(input_api.canned_checks.CheckChangeHasDescription( |
495 input_api, output_api)) | 493 input_api, output_api)) |
496 results.extend(_CheckSubversionConfig(input_api, output_api)) | 494 results.extend(_CheckSubversionConfig(input_api, output_api)) |
497 return results | 495 return results |
498 | 496 |
499 | 497 |
500 def GetPreferredTrySlaves(project, change): | 498 def GetPreferredTrySlaves(project, change): |
501 files = change.LocalPaths() | 499 files = change.LocalPaths() |
502 | 500 |
503 if not files: | 501 if not files: |
504 return [] | 502 return [] |
505 | 503 |
506 if all(re.search('\.(m|mm)$|[/_]mac[/_.]', f) for f in files): | 504 if all(re.search('\.(m|mm)$|[/_]mac[/_.]', f) for f in files): |
507 return ['mac_rel'] | 505 return ['mac_rel'] |
508 if all(re.search('[/_]win[/_.]', f) for f in files): | 506 if all(re.search('[/_]win[/_.]', f) for f in files): |
509 return ['win_rel'] | 507 return ['win_rel'] |
510 if all(re.search('[/_]android[/_.]', f) for f in files): | 508 if all(re.search('[/_]android[/_.]', f) for f in files): |
511 return ['android'] | 509 return ['android'] |
512 | 510 |
513 trybots = ['win_rel', 'linux_rel', 'mac_rel', 'linux_clang:compile', | 511 trybots = ['win_rel', 'linux_rel', 'mac_rel', 'linux_clang:compile', |
514 'android'] | 512 'android'] |
515 # match things like aurax11.cc or aura_oak.cc | 513 # match things like aurax11.cc or aura_oak.cc |
516 if any(re.search('[/_]aura', f) for f in files): | 514 if any(re.search('[/_]aura', f) for f in files): |
517 trybots.append('linux_chromeos') | 515 trybots.append('linux_chromeos') |
518 | 516 |
519 return trybots | 517 return trybots |
OLD | NEW |