| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 # Recipe module for Skia Swarming trigger. | 6 # Recipe module for Skia Swarming trigger. |
| 7 | 7 |
| 8 | 8 |
| 9 import os | 9 import os |
| 10 import json | 10 import json |
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 infrabots_dir = api.path['checkout'].join('infra', 'bots') | 663 infrabots_dir = api.path['checkout'].join('infra', 'bots') |
| 664 api.swarming.setup( | 664 api.swarming.setup( |
| 665 infrabots_dir.join('tools', 'luci-go'), | 665 infrabots_dir.join('tools', 'luci-go'), |
| 666 swarming_rev='') | 666 swarming_rev='') |
| 667 | 667 |
| 668 # Run gsutil.py to ensure that it's installed. | 668 # Run gsutil.py to ensure that it's installed. |
| 669 api.gsutil(['help']) | 669 api.gsutil(['help']) |
| 670 | 670 |
| 671 extra_hashes = [] | 671 extra_hashes = [] |
| 672 | 672 |
| 673 builder_name = api.properties['buildername'] |
| 674 |
| 673 # Get ready to compile. | 675 # Get ready to compile. |
| 674 infrabots_dir = api.path['checkout'].join('infra', 'bots') | 676 infrabots_dir = api.path['checkout'].join('infra', 'bots') |
| 675 if 'Infra' in api.properties['buildername']: | 677 if 'Infra' in builder_name: |
| 676 return infra_swarm(api, got_revision, infrabots_dir, extra_hashes) | 678 return infra_swarm(api, got_revision, infrabots_dir, extra_hashes) |
| 677 | 679 |
| 678 builder_cfg = api.builder_name_schema.DictForBuilderName( | 680 builder_cfg = api.builder_name_schema.DictForBuilderName(builder_name) |
| 679 api.properties['buildername']) | |
| 680 | 681 |
| 681 if 'RecreateSKPs' in api.properties['buildername']: | 682 if 'RecreateSKPs' in builder_name: |
| 682 recreate_skps_swarm(api, builder_cfg, got_revision, infrabots_dir, | 683 recreate_skps_swarm(api, builder_cfg, got_revision, infrabots_dir, |
| 683 extra_hashes) | 684 extra_hashes) |
| 684 return | 685 return |
| 685 | 686 |
| 686 if '-CT_' in api.properties['buildername']: | 687 if '-CT_' in builder_name: |
| 687 ct_skps_swarm(api, builder_cfg, got_revision, infrabots_dir, extra_hashes) | 688 ct_skps_swarm(api, builder_cfg, got_revision, infrabots_dir, extra_hashes) |
| 688 return | 689 return |
| 689 | 690 |
| 690 # Compile. | 691 # Compile. |
| 691 do_compile_steps = True | 692 do_compile_steps = True |
| 692 if 'Coverage' in api.properties['buildername']: | 693 if 'Coverage' in builder_name: |
| 693 do_compile_steps = False | 694 do_compile_steps = False |
| 694 if do_compile_steps: | 695 if do_compile_steps: |
| 695 extra_hashes.append(compile_steps_swarm( | 696 extra_hashes.append(compile_steps_swarm( |
| 696 api, builder_cfg, got_revision, infrabots_dir)) | 697 api, builder_cfg, got_revision, infrabots_dir)) |
| 697 | 698 |
| 698 if builder_cfg['role'] == 'Housekeeper': | 699 if builder_cfg['role'] == 'Housekeeper': |
| 699 housekeeper_swarm(api, builder_cfg, got_revision, infrabots_dir, | 700 housekeeper_swarm(api, builder_cfg, got_revision, infrabots_dir, |
| 700 extra_hashes) | 701 extra_hashes) |
| 701 return | 702 return |
| 702 | 703 |
| 703 # Get ready to test/perf. | 704 # Get ready to test/perf. |
| 704 | 705 |
| 705 # CIPD packages needed by test/perf. | 706 # CIPD packages needed by test/perf. |
| 706 cipd_packages = [] | 707 cipd_packages = [] |
| 707 | 708 |
| 708 do_test_steps = ( | 709 do_test_steps = ( |
| 709 builder_cfg['role'] == api.builder_name_schema.BUILDER_ROLE_TEST) | 710 builder_cfg['role'] == api.builder_name_schema.BUILDER_ROLE_TEST) |
| 710 do_perf_steps = ( | 711 do_perf_steps = ( |
| 711 builder_cfg['role'] == api.builder_name_schema.BUILDER_ROLE_PERF) | 712 builder_cfg['role'] == api.builder_name_schema.BUILDER_ROLE_PERF) |
| 712 | 713 |
| 713 if not (do_test_steps or do_perf_steps): | 714 if not (do_test_steps or do_perf_steps): |
| 714 return | 715 return |
| 715 | 716 |
| 716 # SKPs, SkImages, SVGs. | 717 # SKPs, SkImages, SVGs. |
| 717 cipd_packages.append(cipd_pkg(api, infrabots_dir, 'skp')) | 718 cipd_packages.append(cipd_pkg(api, infrabots_dir, 'skp')) |
| 718 cipd_packages.append(cipd_pkg(api, infrabots_dir, 'skimage')) | 719 cipd_packages.append(cipd_pkg(api, infrabots_dir, 'skimage')) |
| 719 cipd_packages.append(cipd_pkg(api, infrabots_dir, 'svg')) | 720 cipd_packages.append(cipd_pkg(api, infrabots_dir, 'svg')) |
| 720 | 721 |
| 722 # To find llvm-symbolizer and/or MSAN-compiled libc++. |
| 723 if 'Ubuntu' in builder_name and 'SAN' in builder_name: |
| 724 cipd_packages.append(cipd_pkg(api, infrabots_dir, 'clang_linux')) |
| 725 |
| 721 # Trigger test and perf tasks. | 726 # Trigger test and perf tasks. |
| 722 test_task = None | 727 test_task = None |
| 723 perf_task = None | 728 perf_task = None |
| 724 if do_test_steps: | 729 if do_test_steps: |
| 725 test_task = test_steps_trigger(api, builder_cfg, got_revision, | 730 test_task = test_steps_trigger(api, builder_cfg, got_revision, |
| 726 infrabots_dir, extra_hashes, cipd_packages) | 731 infrabots_dir, extra_hashes, cipd_packages) |
| 727 if do_perf_steps: | 732 if do_perf_steps: |
| 728 perf_task = perf_steps_trigger(api, builder_cfg, got_revision, | 733 perf_task = perf_steps_trigger(api, builder_cfg, got_revision, |
| 729 infrabots_dir, extra_hashes, cipd_packages) | 734 infrabots_dir, extra_hashes, cipd_packages) |
| 730 is_trybot = builder_cfg['is_trybot'] | 735 is_trybot = builder_cfg['is_trybot'] |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 mastername='client.skia', | 816 mastername='client.skia', |
| 812 slavename='skiabot-linux-swarm-000', | 817 slavename='skiabot-linux-swarm-000', |
| 813 buildnumber=5, | 818 buildnumber=5, |
| 814 path_config='kitchen', | 819 path_config='kitchen', |
| 815 revision='abc123', | 820 revision='abc123', |
| 816 **gerrit_kwargs) + | 821 **gerrit_kwargs) + |
| 817 api.step_data( | 822 api.step_data( |
| 818 'upload new .isolated file for test_skia', | 823 'upload new .isolated file for test_skia', |
| 819 stdout=api.raw_io.output('def456 XYZ.isolated')) | 824 stdout=api.raw_io.output('def456 XYZ.isolated')) |
| 820 ) | 825 ) |
| OLD | NEW |