Chromium Code Reviews| 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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 474 'gpu': '10de:104a', | 474 'gpu': '10de:104a', |
| 475 'os': 'Windows-2008ServerR2-SP1' | 475 'os': 'Windows-2008ServerR2-SP1' |
| 476 }, | 476 }, |
| 477 { | 477 { |
| 478 'gpu': '10de:104a', | 478 'gpu': '10de:104a', |
| 479 'os': 'Linux' | 479 'os': 'Linux' |
| 480 } | 480 } |
| 481 ], | 481 ], |
| 482 }, | 482 }, |
| 483 ], | 483 ], |
| 484 'swarming_shards': 4 | 484 'swarming': { |
| 485 'shards': 4, | |
| 486 'priority_adjustement': 'lower', | |
|
Ken Russell (switch to Gerrit)
2016/03/28 18:06:53
Typo here and throughout: this should be:
priority
| |
| 487 'expiration': 7200 | |
| 488 } | |
| 485 }, | 489 }, |
| 486 | 490 |
| 487 'angle_deqp_gles3_tests': { | 491 'angle_deqp_gles3_tests': { |
| 488 'tester_configs': [ | 492 'tester_configs': [ |
| 489 { | 493 { |
| 490 'fyi_only': True, | 494 'fyi_only': True, |
| 491 # TODO(jmadill): Run this on the optional tryservers. | 495 # TODO(jmadill): Run this on the optional tryservers. |
| 492 'run_on_optional': False, | 496 'run_on_optional': False, |
| 493 # Run only on the Win7 and Linux Release NVIDIA 32-bit bots | 497 # Run only on the Win7 and Linux Release NVIDIA 32-bit bots |
| 494 # (and trybots) for the time being, at least until more capacity is | 498 # (and trybots) for the time being, at least until more capacity is |
| 495 # added. | 499 # added. |
| 496 'build_configs': ['Release'], | 500 'build_configs': ['Release'], |
| 497 'swarming_dimension_sets': [ | 501 'swarming_dimension_sets': [ |
| 498 { | 502 { |
| 499 'gpu': '10de:104a', | 503 'gpu': '10de:104a', |
| 500 'os': 'Windows-2008ServerR2-SP1' | 504 'os': 'Windows-2008ServerR2-SP1' |
| 501 }, | 505 }, |
| 502 { | 506 { |
| 503 'gpu': '10de:104a', | 507 'gpu': '10de:104a', |
| 504 'os': 'Linux' | 508 'os': 'Linux' |
| 505 } | 509 } |
| 506 ], | 510 ], |
| 507 } | 511 } |
| 508 ], | 512 ], |
| 509 'swarming_shards': 12 | 513 'swarming': { |
| 514 'shards': 12, | |
| 515 'priority_adjustement': 'lower', | |
| 516 'expiration': 7200 | |
| 517 } | |
| 510 }, | 518 }, |
| 511 | 519 |
| 512 # Until we have more capacity, run angle_end2end_tests only on the | 520 # Until we have more capacity, run angle_end2end_tests only on the |
| 513 # FYI waterfall, the ANGLE trybots (which mirror the FYI waterfall), | 521 # FYI waterfall, the ANGLE trybots (which mirror the FYI waterfall), |
| 514 # and the optional trybots (mainly used during ANGLE rolls). | 522 # and the optional trybots (mainly used during ANGLE rolls). |
| 515 'angle_end2end_tests': { | 523 'angle_end2end_tests': { |
| 516 'tester_configs': [ | 524 'tester_configs': [ |
| 517 { | 525 { |
| 518 'fyi_only': True, | 526 'fyi_only': True, |
| 519 'run_on_optional': True, | 527 'run_on_optional': True, |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 782 result['name'] = test | 790 result['name'] = test |
| 783 else: | 791 else: |
| 784 result['test'] = test | 792 result['test'] = test |
| 785 if (not tester_config['swarming']) and test in NON_SWARMED_GTESTS: | 793 if (not tester_config['swarming']) and test in NON_SWARMED_GTESTS: |
| 786 # Need to override this result. | 794 # Need to override this result. |
| 787 result = copy.deepcopy(NON_SWARMED_GTESTS[test]) | 795 result = copy.deepcopy(NON_SWARMED_GTESTS[test]) |
| 788 result['name'] = test | 796 result['name'] = test |
| 789 else: | 797 else: |
| 790 # Put the swarming dimensions in anyway. If the tester is later | 798 # Put the swarming dimensions in anyway. If the tester is later |
| 791 # swarmed, they will come in handy. | 799 # swarmed, they will come in handy. |
| 792 result['swarming'] = { | 800 if not 'swarming' in result: |
| 801 result['swarming'] = {} | |
| 802 result['swarming'].update({ | |
| 793 'can_use_on_swarming_builders': True, | 803 'can_use_on_swarming_builders': True, |
| 794 'dimension_sets': [ | 804 'dimension_sets': [ |
| 795 tester_config['swarming_dimensions'] | 805 tester_config['swarming_dimensions'] |
| 796 ], | 806 ], |
| 797 } | 807 }) |
| 798 if result.get('swarming_shards'): | |
| 799 result['swarming']['shards'] = result['swarming_shards'] | |
| 800 result.pop('swarming_shards') | |
| 801 # This flag only has an effect on the Linux bots that run tests | 808 # This flag only has an effect on the Linux bots that run tests |
| 802 # locally (as opposed to via Swarming), which are only those couple | 809 # locally (as opposed to via Swarming), which are only those couple |
| 803 # on the chromium.gpu.fyi waterfall. Still, there is no harm in | 810 # on the chromium.gpu.fyi waterfall. Still, there is no harm in |
| 804 # specifying it everywhere. | 811 # specifying it everywhere. |
| 805 result['use_xvfb'] = False | 812 result['use_xvfb'] = False |
| 806 return result | 813 return result |
| 807 | 814 |
| 808 def generate_telemetry_test(tester_name, tester_config, | 815 def generate_telemetry_test(tester_name, tester_config, |
| 809 test, test_config, is_fyi): | 816 test, test_config, is_fyi): |
| 810 if not should_run_on_tester(tester_name, tester_config, test_config, is_fyi): | 817 if not should_run_on_tester(tester_name, tester_config, test_config, is_fyi): |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 879 tester_name, tester_config, test_name, test_config, is_fyi) | 886 tester_name, tester_config, test_name, test_config, is_fyi) |
| 880 if test: | 887 if test: |
| 881 isolated_scripts.append(test) | 888 isolated_scripts.append(test) |
| 882 return isolated_scripts | 889 return isolated_scripts |
| 883 | 890 |
| 884 def generate_all_tests(waterfall, is_fyi): | 891 def generate_all_tests(waterfall, is_fyi): |
| 885 tests = {} | 892 tests = {} |
| 886 for builder in waterfall['builders']: | 893 for builder in waterfall['builders']: |
| 887 tests[builder] = {} | 894 tests[builder] = {} |
| 888 for name, config in waterfall['testers'].iteritems(): | 895 for name, config in waterfall['testers'].iteritems(): |
| 889 gtests = [] | 896 gtests = generate_gtests(name, config, COMMON_GTESTS, is_fyi) |
| 890 gtests.extend(generate_gtests(name, config, COMMON_GTESTS, is_fyi)) | 897 isolated_scripts = \ |
| 891 isolated_scripts = [] | 898 generate_telemetry_tests(name, config, TELEMETRY_TESTS, is_fyi) |
| 892 isolated_scripts.extend(generate_telemetry_tests( | 899 tests[name] = { |
| 893 name, config, TELEMETRY_TESTS, is_fyi)) | 900 'gtest_tests': sorted(gtests, key=lambda x: x['test']), |
| 894 cur_tests = {} | 901 'isolated_scripts': sorted(isolated_scripts, key=lambda x: x['name']) |
| 895 if gtests: | 902 } |
| 896 cur_tests['gtest_tests'] = sorted(gtests, key=lambda x: x['test']) | |
| 897 if isolated_scripts: | |
| 898 cur_tests['isolated_scripts'] = sorted( | |
| 899 isolated_scripts, key=lambda x: x['name']) | |
| 900 tests[name] = cur_tests | |
| 901 tests['AAAAA1 AUTOGENERATED FILE DO NOT EDIT'] = {} | 903 tests['AAAAA1 AUTOGENERATED FILE DO NOT EDIT'] = {} |
| 902 tests['AAAAA2 See generate_buildbot_json.py to make changes'] = {} | 904 tests['AAAAA2 See generate_buildbot_json.py to make changes'] = {} |
| 903 filename = 'chromium.gpu.fyi.json' if is_fyi else 'chromium.gpu.json' | 905 filename = 'chromium.gpu.fyi.json' if is_fyi else 'chromium.gpu.json' |
| 904 with open(os.path.join(SRC_DIR, 'testing', 'buildbot', filename), 'w') as fp: | 906 with open(os.path.join(SRC_DIR, 'testing', 'buildbot', filename), 'w') as fp: |
| 905 json.dump(tests, fp, indent=2, separators=(',', ': '), sort_keys=True) | 907 json.dump(tests, fp, indent=2, separators=(',', ': '), sort_keys=True) |
| 906 fp.write('\n') | 908 fp.write('\n') |
| 907 | 909 |
| 908 def main(): | 910 def main(): |
| 909 generate_all_tests(FYI_WATERFALL, True) | 911 generate_all_tests(FYI_WATERFALL, True) |
| 910 generate_all_tests(WATERFALL, False) | 912 generate_all_tests(WATERFALL, False) |
| 911 return 0 | 913 return 0 |
| 912 | 914 |
| 913 if __name__ == "__main__": | 915 if __name__ == "__main__": |
| 914 sys.exit(main()) | 916 sys.exit(main()) |
| OLD | NEW |