OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 | 5 |
6 """Miscellaneous utilities needed by the Skia buildbot master.""" | 6 """Miscellaneous utilities needed by the Skia buildbot master.""" |
7 | 7 |
8 | 8 |
9 import difflib | 9 import difflib |
10 import httplib2 | 10 import httplib2 |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 # pylint: disable=W0601 | 446 # pylint: disable=W0601 |
447 global skia_all_subdirs | 447 global skia_all_subdirs |
448 try: | 448 try: |
449 if skia_all_subdirs: | 449 if skia_all_subdirs: |
450 raise Exception('skia_all_subdirs has already been defined!') | 450 raise Exception('skia_all_subdirs has already been defined!') |
451 except NameError: | 451 except NameError: |
452 skia_all_subdirs = all_subdirs | 452 skia_all_subdirs = all_subdirs |
453 | 453 |
454 | 454 |
455 def _MakeBuilder(helper, role, os, model, gpu, configuration, arch, | 455 def _MakeBuilder(helper, role, os, model, gpu, configuration, arch, |
456 gm_image_subdir, factory_type, extra_config=None, | 456 factory_type, extra_config=None, |
457 perf_output_basedir=None, extra_branches=None, is_trybot=False, | 457 perf_output_basedir=None, extra_branches=None, is_trybot=False, |
458 **kwargs): | 458 **kwargs): |
459 """ Creates a builder and scheduler. | 459 """ Creates a builder and scheduler.""" |
460 | |
461 TODO(epoger): gm_image_subdir is no longer used, should be removed.""" | |
462 B = helper.Builder | 460 B = helper.Builder |
463 F = helper.Factory | 461 F = helper.Factory |
464 | 462 |
465 if not extra_branches: | 463 if not extra_branches: |
466 extra_branches = [] | 464 extra_branches = [] |
467 subdirs_to_checkout = set(extra_branches) | 465 subdirs_to_checkout = set(extra_branches) |
468 | 466 |
469 builder_name = builder_name_schema.MakeBuilderName( | 467 builder_name = builder_name_schema.MakeBuilderName( |
470 role=role, | 468 role=role, |
471 os=os, | 469 os=os, |
(...skipping 10 matching lines...) Expand all Loading... |
482 scheduler_name = builder_name + builder_name_schema.BUILDER_NAME_SEP + \ | 480 scheduler_name = builder_name + builder_name_schema.BUILDER_NAME_SEP + \ |
483 'Scheduler' | 481 'Scheduler' |
484 branches = list(subdirs_to_checkout.union(SKIA_PRIMARY_SUBDIRS)) | 482 branches = list(subdirs_to_checkout.union(SKIA_PRIMARY_SUBDIRS)) |
485 helper.AnyBranchScheduler(scheduler_name, branches=branches) | 483 helper.AnyBranchScheduler(scheduler_name, branches=branches) |
486 | 484 |
487 B(builder_name, 'f_%s' % builder_name, scheduler=scheduler_name) | 485 B(builder_name, 'f_%s' % builder_name, scheduler=scheduler_name) |
488 F('f_%s' % builder_name, factory_type( | 486 F('f_%s' % builder_name, factory_type( |
489 builder_name=builder_name, | 487 builder_name=builder_name, |
490 other_subdirs=subdirs_to_checkout, | 488 other_subdirs=subdirs_to_checkout, |
491 configuration=configuration, | 489 configuration=configuration, |
492 gm_image_subdir=gm_image_subdir, | |
493 do_patch_step=is_trybot, | 490 do_patch_step=is_trybot, |
494 perf_output_basedir=perf_output_basedir, | 491 perf_output_basedir=perf_output_basedir, |
495 **kwargs | 492 **kwargs |
496 ).Build(role=role)) | 493 ).Build(role=role)) |
497 | 494 |
498 | 495 |
499 def _MakeBuilderAndMaybeTrybotSet(do_trybots=True, **kwargs): | 496 def _MakeBuilderAndMaybeTrybotSet(do_trybots=True, **kwargs): |
500 _MakeBuilder(**kwargs) | 497 _MakeBuilder(**kwargs) |
501 if do_trybots: | 498 if do_trybots: |
502 _MakeBuilder(is_trybot=True, **kwargs) | 499 _MakeBuilder(is_trybot=True, **kwargs) |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 # request is associated with a change but the revisions match (#5 above). | 575 # request is associated with a change but the revisions match (#5 above). |
579 if req1.source.changes and not req2.source.changes: | 576 if req1.source.changes and not req2.source.changes: |
580 return False | 577 return False |
581 if not req1.source.changes and req2.source.changes: | 578 if not req1.source.changes and req2.source.changes: |
582 return False | 579 return False |
583 if not (req1.source.changes and req2.source.changes): | 580 if not (req1.source.changes and req2.source.changes): |
584 if req1.source.revision != req2.source.revision: | 581 if req1.source.revision != req2.source.revision: |
585 return False | 582 return False |
586 | 583 |
587 return True | 584 return True |
OLD | NEW |