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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 results.extend(_CheckSubversionConfig(input_api, output_api)) | 572 results.extend(_CheckSubversionConfig(input_api, output_api)) |
573 return results | 573 return results |
574 | 574 |
575 | 575 |
576 def GetPreferredTrySlaves(project, change): | 576 def GetPreferredTrySlaves(project, change): |
577 files = change.LocalPaths() | 577 files = change.LocalPaths() |
578 | 578 |
579 if not files: | 579 if not files: |
580 return [] | 580 return [] |
581 | 581 |
582 if all(re.search('\.(m|mm)$|[/_]mac[/_.]', f) for f in files): | 582 if all(re.search('\.(m|mm)$|(^|[/_])mac[/_.]', f) for f in files): |
583 return ['mac_rel', 'mac_asan'] | 583 return ['mac_rel', 'mac_asan'] |
584 if all(re.search('[/_]win[/_.]', f) for f in files): | 584 if all(re.search('(^|[/_])win[/_.]', f) for f in files): |
585 return ['win_rel'] | 585 return ['win_rel'] |
586 if all(re.search('[/_]android[/_.]', f) for f in files): | 586 if all(re.search('(^|[/_])android[/_.]', f) for f in files): |
587 return ['android'] | 587 return ['android'] |
588 | 588 |
589 trybots = ['win_rel', 'linux_rel', 'mac_rel', 'linux_clang:compile', | 589 trybots = ['win_rel', 'linux_rel', 'mac_rel', 'linux_clang:compile', |
590 'linux_chromeos', 'android', 'mac_asan'] | 590 'linux_chromeos', 'android', 'mac_asan'] |
591 | 591 |
592 # Match things like path/aura/file.cc and path/file_aura.cc. | 592 # Match things like path/aura/file.cc and path/file_aura.cc. |
593 # Same for ash and chromeos. | 593 # Same for ash and chromeos. |
594 if any(re.search('[/_](ash|aura)', f) for f in files): | 594 if any(re.search('[/_](ash|aura)', f) for f in files): |
595 trybots += ['linux_chromeos', 'linux_chromeos_clang:compile', 'win_aura', | 595 trybots += ['linux_chromeos', 'linux_chromeos_clang:compile', 'win_aura', |
596 'linux_chromeos_asan'] | 596 'linux_chromeos_asan'] |
597 else: | 597 else: |
598 if any(re.search('[/_]chromeos', f) for f in files): | 598 if any(re.search('[/_]chromeos', f) for f in files): |
599 trybots += ['linux_chromeos', 'linux_chromeos_clang:compile', | 599 trybots += ['linux_chromeos', 'linux_chromeos_clang:compile', |
600 'linux_chromeos_asan'] | 600 'linux_chromeos_asan'] |
601 | 601 |
602 return trybots | 602 return trybots |
OLD | NEW |