| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Script to generate chromium.gpu.json and chromium.gpu.fyi.json in | 6 """Script to generate chromium.gpu.json and chromium.gpu.fyi.json in |
| 7 the src/testing/buildbot directory. Maintaining these files by hand is | 7 the src/testing/buildbot directory. Maintaining these files by hand is |
| 8 too unwieldy. | 8 too unwieldy. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 }, | 66 }, |
| 67 'Mac 10.10 Debug (Intel)': { | 67 'Mac 10.10 Debug (Intel)': { |
| 68 'swarming_dimensions': { | 68 'swarming_dimensions': { |
| 69 'gpu': '8086:0a2e', | 69 'gpu': '8086:0a2e', |
| 70 'os': 'Mac-10.10' | 70 'os': 'Mac-10.10' |
| 71 }, | 71 }, |
| 72 'build_config': 'Debug', | 72 'build_config': 'Debug', |
| 73 'swarming': True, | 73 'swarming': True, |
| 74 'os_type': 'mac', | 74 'os_type': 'mac', |
| 75 }, | 75 }, |
| 76 'Mac Retina Release': { | |
| 77 'swarming_dimensions': { | |
| 78 'gpu': '10de:0fe9', | |
| 79 'hidpi': '1', | |
| 80 'os': 'Mac' | |
| 81 }, | |
| 82 'build_config': 'Release', | |
| 83 'swarming': True, | |
| 84 'os_type': 'mac', | |
| 85 }, | |
| 86 'Mac Retina Debug': { | |
| 87 'swarming_dimensions': { | |
| 88 'gpu': '10de:0fe9', | |
| 89 'hidpi': '1', | |
| 90 'os': 'Mac' | |
| 91 }, | |
| 92 'build_config': 'Debug', | |
| 93 'swarming': True, | |
| 94 'os_type': 'mac', | |
| 95 }, | |
| 96 'Mac 10.10 Retina Release (AMD)': { | 76 'Mac 10.10 Retina Release (AMD)': { |
| 97 'swarming_dimensions': { | 77 'swarming_dimensions': { |
| 98 'gpu': '1002:6821', | 78 'gpu': '1002:6821', |
| 99 'hidpi': '1', | 79 'hidpi': '1', |
| 100 'os': 'Mac-10.10' | 80 'os': 'Mac-10.10' |
| 101 }, | 81 }, |
| 102 'build_config': 'Release', | 82 'build_config': 'Release', |
| 103 'swarming': True, | 83 'swarming': True, |
| 104 'os_type': 'mac', | 84 'os_type': 'mac', |
| 105 }, | 85 }, |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 'expiration': 7200 | 568 'expiration': 7200 |
| 589 } | 569 } |
| 590 }, | 570 }, |
| 591 | 571 |
| 592 # Until we have more capacity, run angle_end2end_tests only on the | 572 # Until we have more capacity, run angle_end2end_tests only on the |
| 593 # FYI waterfall, the ANGLE trybots (which mirror the FYI waterfall), | 573 # FYI waterfall, the ANGLE trybots (which mirror the FYI waterfall), |
| 594 # and the optional trybots (mainly used during ANGLE rolls). | 574 # and the optional trybots (mainly used during ANGLE rolls). |
| 595 'angle_end2end_tests': { | 575 'angle_end2end_tests': { |
| 596 'tester_configs': [ | 576 'tester_configs': [ |
| 597 { | 577 { |
| 598 'allow_on_mac_nvidia': True, | |
| 599 'fyi_only': True, | 578 'fyi_only': True, |
| 600 'run_on_optional': True, | 579 'run_on_optional': True, |
| 601 }, | 580 }, |
| 602 ], | 581 ], |
| 603 'args': ['--use-gpu-in-tests'] | 582 'args': ['--use-gpu-in-tests'] |
| 604 }, | 583 }, |
| 605 'angle_unittests': {'args': ['--use-gpu-in-tests']}, | 584 'angle_unittests': {'args': ['--use-gpu-in-tests']}, |
| 606 # Until the media-only tests are extracted from content_unittests, | 585 # Until the media-only tests are extracted from content_unittests, |
| 607 # and audio_unittests and content_unittests can be run on the commit | 586 # and audio_unittests and content_unittests can be run on the commit |
| 608 # queue with --require-audio-hardware-for-testing, run them only on | 587 # queue with --require-audio-hardware-for-testing, run them only on |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 712 } | 691 } |
| 713 } | 692 } |
| 714 | 693 |
| 715 TELEMETRY_TESTS = { | 694 TELEMETRY_TESTS = { |
| 716 'context_lost': {}, | 695 'context_lost': {}, |
| 717 'gpu_process_launch_tests': {'target_name': 'gpu_process'}, | 696 'gpu_process_launch_tests': {'target_name': 'gpu_process'}, |
| 718 'gpu_rasterization': {}, | 697 'gpu_rasterization': {}, |
| 719 'hardware_accelerated_feature': {}, | 698 'hardware_accelerated_feature': {}, |
| 720 'maps_pixel_test': { | 699 'maps_pixel_test': { |
| 721 'target_name': 'maps', | 700 'target_name': 'maps', |
| 722 'tester_configs': [ | |
| 723 { | |
| 724 'allow_on_mac_nvidia': True, | |
| 725 }, | |
| 726 ], | |
| 727 }, | 701 }, |
| 728 'memory_test': {}, | 702 'memory_test': {}, |
| 729 'pixel_test': { | 703 'pixel_test': { |
| 730 'target_name': 'pixel', | 704 'target_name': 'pixel', |
| 731 'args': [ | 705 'args': [ |
| 732 '--refimg-cloud-storage-bucket', | 706 '--refimg-cloud-storage-bucket', |
| 733 'chromium-gpu-archive/reference-images', | 707 'chromium-gpu-archive/reference-images', |
| 734 '--os-type', | 708 '--os-type', |
| 735 '${os_type}', | 709 '${os_type}', |
| 736 '--build-revision', | 710 '--build-revision', |
| 737 '${got_revision}', | 711 '${got_revision}', |
| 738 '--test-machine-name', | 712 '--test-machine-name', |
| 739 '${buildername}', | 713 '${buildername}', |
| 740 ], | 714 ], |
| 741 'non_precommit_args': [ | 715 'non_precommit_args': [ |
| 742 '--upload-refimg-to-cloud-storage', | 716 '--upload-refimg-to-cloud-storage', |
| 743 ], | 717 ], |
| 744 'precommit_args': [ | 718 'precommit_args': [ |
| 745 '--download-refimg-from-cloud-storage', | 719 '--download-refimg-from-cloud-storage', |
| 746 ], | 720 ], |
| 747 'tester_configs': [ | |
| 748 { | |
| 749 'allow_on_mac_nvidia': True, | |
| 750 }, | |
| 751 ], | |
| 752 }, | 721 }, |
| 753 'screenshot_sync': {}, | 722 'screenshot_sync': {}, |
| 754 'trace_test': {}, | 723 'trace_test': {}, |
| 755 'webgl_conformance': { | 724 'webgl_conformance': { |
| 756 'tester_configs': [ | |
| 757 { | |
| 758 'allow_on_mac_nvidia': True, | |
| 759 }, | |
| 760 ], | |
| 761 }, | 725 }, |
| 762 'webgl_conformance_d3d9_tests': { | 726 'webgl_conformance_d3d9_tests': { |
| 763 'tester_configs': [ | 727 'tester_configs': [ |
| 764 { | 728 { |
| 765 'fyi_only': True, | 729 'fyi_only': True, |
| 766 'os_types': ['win'], | 730 'os_types': ['win'], |
| 767 'run_on_optional': True, | 731 'run_on_optional': True, |
| 768 } | 732 } |
| 769 ], | 733 ], |
| 770 'target_name': 'webgl_conformance', | 734 'target_name': 'webgl_conformance', |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 } | 777 } |
| 814 ], | 778 ], |
| 815 'target_name': 'webgl_conformance', | 779 'target_name': 'webgl_conformance', |
| 816 'extra_browser_args': [ | 780 'extra_browser_args': [ |
| 817 '--use-gl=angle', | 781 '--use-gl=angle', |
| 818 ], | 782 ], |
| 819 }, | 783 }, |
| 820 'webgl2_conformance_tests': { | 784 'webgl2_conformance_tests': { |
| 821 'tester_configs': [ | 785 'tester_configs': [ |
| 822 { | 786 { |
| 823 'allow_on_mac_nvidia': True, | |
| 824 # The WebGL 2.0 conformance tests take over an hour to run on | 787 # The WebGL 2.0 conformance tests take over an hour to run on |
| 825 # the Debug bots, which is too long. | 788 # the Debug bots, which is too long. |
| 826 'build_configs': ['Release', 'Release_x64'], | 789 'build_configs': ['Release', 'Release_x64'], |
| 827 'fyi_only': True, | 790 'fyi_only': True, |
| 828 'run_on_optional': True, | 791 'run_on_optional': True, |
| 829 }, | 792 }, |
| 830 ], | 793 ], |
| 831 'disabled_tester_configs': [ | 794 'disabled_tester_configs': [ |
| 832 { | 795 { |
| 833 'names': [ | 796 'names': [ |
| (...skipping 24 matching lines...) Expand all Loading... |
| 858 } | 821 } |
| 859 return [string.Template(arg).safe_substitute(substitutions) for arg in args] | 822 return [string.Template(arg).safe_substitute(substitutions) for arg in args] |
| 860 | 823 |
| 861 def matches_swarming_dimensions(tester_config, dimension_sets): | 824 def matches_swarming_dimensions(tester_config, dimension_sets): |
| 862 for dimensions in dimension_sets: | 825 for dimensions in dimension_sets: |
| 863 if set(dimensions.items()).issubset( | 826 if set(dimensions.items()).issubset( |
| 864 tester_config['swarming_dimensions'].items()): | 827 tester_config['swarming_dimensions'].items()): |
| 865 return True | 828 return True |
| 866 return False | 829 return False |
| 867 | 830 |
| 868 def is_mac_nvidia_retina(tester_config): | |
| 869 dims = tester_config['swarming_dimensions'] | |
| 870 return (dims['gpu'] == '10de:0fe9' and | |
| 871 dims['hidpi'] == '1' and | |
| 872 dims['os'] == 'Mac') | |
| 873 | |
| 874 def is_android(tester_config): | 831 def is_android(tester_config): |
| 875 return tester_config['os_type'] == 'android' | 832 return tester_config['os_type'] == 'android' |
| 876 | 833 |
| 877 def tester_config_matches_tester(tester_name, tester_config, tc, is_fyi, | 834 def tester_config_matches_tester(tester_name, tester_config, tc, is_fyi, |
| 878 check_waterfall): | 835 check_waterfall): |
| 879 if check_waterfall: | 836 if check_waterfall: |
| 880 if tc.get('fyi_only', False) and not is_fyi: | 837 if tc.get('fyi_only', False) and not is_fyi: |
| 881 return False | 838 return False |
| 882 # Handle the optional tryservers with the 'run_on_optional' flag. | 839 # Handle the optional tryservers with the 'run_on_optional' flag. |
| 883 # Only a subset of the tests run on these tryservers. | 840 # Only a subset of the tests run on these tryservers. |
| 884 if tester_name.startswith('Optional') and not tc.get( | 841 if tester_name.startswith('Optional') and not tc.get( |
| 885 'run_on_optional', False): | 842 'run_on_optional', False): |
| 886 return False | 843 return False |
| 887 | 844 |
| 888 if 'names' in tc: | 845 if 'names' in tc: |
| 889 if not tester_name in tc['names']: | 846 if not tester_name in tc['names']: |
| 890 return False | 847 return False |
| 891 if 'os_types' in tc: | 848 if 'os_types' in tc: |
| 892 if not tester_config['os_type'] in tc['os_types']: | 849 if not tester_config['os_type'] in tc['os_types']: |
| 893 return False | 850 return False |
| 894 if 'build_configs' in tc: | 851 if 'build_configs' in tc: |
| 895 if not tester_config['build_config'] in tc['build_configs']: | 852 if not tester_config['build_config'] in tc['build_configs']: |
| 896 return False | 853 return False |
| 897 if 'swarming_dimension_sets' in tc: | 854 if 'swarming_dimension_sets' in tc: |
| 898 if not matches_swarming_dimensions(tester_config, | 855 if not matches_swarming_dimensions(tester_config, |
| 899 tc['swarming_dimension_sets']): | 856 tc['swarming_dimension_sets']): |
| 900 return False | 857 return False |
| 901 # The NVIDIA based MacBook Pro Retinas are oversubscribed and this | |
| 902 # is causing severe problems with Chromium's commit queue | |
| 903 # (http://crbug.com/572793). As a short-term strategy, run only | |
| 904 # critical tests on this configuration; this means removing | |
| 905 # everything except the ANGLE end-to-end tests and WebGL 1.0 and 2.0 | |
| 906 # conformance tests. This also disables all tests on the Debug | |
| 907 # NVIDIA bots, because they will effectively lock up some 3 Swarming | |
| 908 # bots permanently due to repeatedly launching WebGL 1.0 conformance | |
| 909 # tests on the chromium.gpu waterfall, and WebGL 1.0 and 2.0 | |
| 910 # conformance tests on the chromium.gpu.fyi waterfall. | |
| 911 if is_mac_nvidia_retina(tester_config): | |
| 912 # Disable all tests on the Debug NVIDIA Retina bots for now. Even | |
| 913 # though these aren't part of the highest-volume | |
| 914 # mac_chromium_rel_ng tryserver configuration, these tests are | |
| 915 # slow, and will lock up a certain number of crucial Swarming | |
| 916 # machines essentially permanently. | |
| 917 if tester_config['build_config'] == 'Debug': | |
| 918 return False | |
| 919 if not tc.get('allow_on_mac_nvidia', False): | |
| 920 return False | |
| 921 if is_android(tester_config): | 858 if is_android(tester_config): |
| 922 if not tc.get('allow_on_android', False): | 859 if not tc.get('allow_on_android', False): |
| 923 return False | 860 return False |
| 924 return True | 861 return True |
| 925 | 862 |
| 926 def should_run_on_tester(tester_name, tester_config, test_config, is_fyi): | 863 def should_run_on_tester(tester_name, tester_config, test_config, is_fyi): |
| 927 # Check if this config is disabled on this tester | 864 # Check if this config is disabled on this tester |
| 928 if 'disabled_tester_configs' in test_config: | 865 if 'disabled_tester_configs' in test_config: |
| 929 for dtc in test_config['disabled_tester_configs']: | 866 for dtc in test_config['disabled_tester_configs']: |
| 930 if tester_config_matches_tester(tester_name, tester_config, dtc, is_fyi, | 867 if tester_config_matches_tester(tester_name, tester_config, dtc, is_fyi, |
| 931 False): | 868 False): |
| 932 return False | 869 return False |
| 933 if 'tester_configs' in test_config: | 870 if 'tester_configs' in test_config: |
| 934 for tc in test_config['tester_configs']: | 871 for tc in test_config['tester_configs']: |
| 935 if tester_config_matches_tester(tester_name, tester_config, tc, is_fyi, | 872 if tester_config_matches_tester(tester_name, tester_config, tc, is_fyi, |
| 936 True): | 873 True): |
| 937 return True | 874 return True |
| 938 return False | 875 return False |
| 939 else: | 876 else: |
| 940 # If tester_configs is unspecified, run nearly all tests by default, | 877 # If tester_configs is unspecified, run nearly all tests by default, |
| 941 # but let tester_config_matches_tester filter out any undesired | 878 # but let tester_config_matches_tester filter out any undesired |
| 942 # tests, such as ones that should only run on the Optional bots, or | 879 # tests, such as ones that should only run on the Optional bots. |
| 943 # not run on the NVIDIA Retina MacBook Pros. | |
| 944 return tester_config_matches_tester(tester_name, tester_config, {}, | 880 return tester_config_matches_tester(tester_name, tester_config, {}, |
| 945 is_fyi, True) | 881 is_fyi, True) |
| 946 | 882 |
| 947 def generate_gtest(tester_name, tester_config, test, test_config, is_fyi): | 883 def generate_gtest(tester_name, tester_config, test, test_config, is_fyi): |
| 948 if not should_run_on_tester(tester_name, tester_config, test_config, is_fyi): | 884 if not should_run_on_tester(tester_name, tester_config, test_config, is_fyi): |
| 949 return None | 885 return None |
| 950 result = copy.deepcopy(test_config) | 886 result = copy.deepcopy(test_config) |
| 951 if 'tester_configs' in result: | 887 if 'tester_configs' in result: |
| 952 # Don't print the tester_configs in the JSON. | 888 # Don't print the tester_configs in the JSON. |
| 953 result.pop('tester_configs') | 889 result.pop('tester_configs') |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 json.dump(tests, fp, indent=2, separators=(',', ': '), sort_keys=True) | 1019 json.dump(tests, fp, indent=2, separators=(',', ': '), sort_keys=True) |
| 1084 fp.write('\n') | 1020 fp.write('\n') |
| 1085 | 1021 |
| 1086 def main(): | 1022 def main(): |
| 1087 generate_all_tests(FYI_WATERFALL, True) | 1023 generate_all_tests(FYI_WATERFALL, True) |
| 1088 generate_all_tests(WATERFALL, False) | 1024 generate_all_tests(WATERFALL, False) |
| 1089 return 0 | 1025 return 0 |
| 1090 | 1026 |
| 1091 if __name__ == "__main__": | 1027 if __name__ == "__main__": |
| 1092 sys.exit(main()) | 1028 sys.exit(main()) |
| OLD | NEW |