| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import collections | 5 import collections |
| 6 | 6 |
| 7 from . import steps | 7 from . import steps |
| 8 | 8 |
| 9 | 9 |
| 10 _builders = collections.defaultdict(dict) | 10 _builders = collections.defaultdict(dict) |
| 11 | 11 |
| 12 | 12 |
| 13 SPEC = { | 13 SPEC = { |
| 14 'builders': {}, | 14 'builders': {}, |
| 15 'settings': { | 15 'settings': { |
| 16 'build_gs_bucket': 'chrome-perf', | 16 'build_gs_bucket': 'chrome-perf', |
| 17 # Bucket for storing builds for manual bisect |
| 18 'bisect_build_gs_bucket': 'chrome-test-builds', |
| 19 'bisect_build_gs_extra': 'official-by-commit', |
| 20 'bisect_builders': [] |
| 17 }, | 21 }, |
| 18 } | 22 } |
| 19 | 23 |
| 20 | 24 |
| 21 def _BaseSpec(bot_type, config_name, disable_tests, | 25 def _BaseSpec(bot_type, config_name, disable_tests, |
| 22 platform, target_bits, tests): | 26 platform, target_bits, tests): |
| 23 spec = { | 27 spec = { |
| 24 'bot_type': bot_type, | 28 'bot_type': bot_type, |
| 25 'chromium_config': config_name, | 29 'chromium_config': config_name, |
| 26 'chromium_config_kwargs': { | 30 'chromium_config_kwargs': { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 spec['results-url'] = 'https://chromeperf.appspot.com' | 90 spec['results-url'] = 'https://chromeperf.appspot.com' |
| 87 | 91 |
| 88 if platform != 'android': | 92 if platform != 'android': |
| 89 # TODO: Remove disable_tests and run test_generators on Android. | 93 # TODO: Remove disable_tests and run test_generators on Android. |
| 90 spec['test_generators'] = [steps.generate_script] | 94 spec['test_generators'] = [steps.generate_script] |
| 91 spec['test_spec_file'] = 'chromium.perf.json' | 95 spec['test_spec_file'] = 'chromium.perf.json' |
| 92 | 96 |
| 93 return spec | 97 return spec |
| 94 | 98 |
| 95 | 99 |
| 96 def _AddBuildSpec(name, platform, target_bits=64): | 100 def _AddBuildSpec(name, platform, target_bits=64, add_to_bisect=False): |
| 97 if target_bits == 64: | 101 if target_bits == 64: |
| 98 perf_id = platform | 102 perf_id = platform |
| 99 else: | 103 else: |
| 100 perf_id = '%s-%d' % (platform, target_bits) | 104 perf_id = '%s-%d' % (platform, target_bits) |
| 101 | 105 |
| 102 SPEC['builders'][name] = BuildSpec( | 106 SPEC['builders'][name] = BuildSpec( |
| 103 'chromium_perf', perf_id, platform, target_bits) | 107 'chromium_perf', perf_id, platform, target_bits) |
| 104 assert target_bits not in _builders[platform] | 108 assert target_bits not in _builders[platform] |
| 105 _builders[platform][target_bits] = name | 109 _builders[platform][target_bits] = name |
| 110 if add_to_bisect: |
| 111 SPEC['settings']['bisect_builders'].append(name) |
| 106 | 112 |
| 107 | 113 |
| 108 def _AddTestSpec(name, perf_id, platform, target_bits=64, | 114 def _AddTestSpec(name, perf_id, platform, target_bits=64, |
| 109 max_battery_temp=350, num_host_shards=1, num_device_shards=1): | 115 max_battery_temp=350, num_host_shards=1, num_device_shards=1): |
| 110 parent_builder = _builders[platform][target_bits] | 116 parent_builder = _builders[platform][target_bits] |
| 111 for shard_index in xrange(num_host_shards): | 117 for shard_index in xrange(num_host_shards): |
| 112 builder_name = '%s (%d)' % (name, shard_index + 1) | 118 builder_name = '%s (%d)' % (name, shard_index + 1) |
| 113 SPEC['builders'][builder_name] = _TestSpec( | 119 SPEC['builders'][builder_name] = _TestSpec( |
| 114 'chromium_perf', parent_builder, perf_id, platform, target_bits, | 120 'chromium_perf', parent_builder, perf_id, platform, target_bits, |
| 115 max_battery_temp, shard_index, num_host_shards, num_device_shards) | 121 max_battery_temp, shard_index, num_host_shards, num_device_shards) |
| 116 | 122 |
| 117 | 123 |
| 118 _AddBuildSpec('Android Builder', 'android', target_bits=32) | 124 _AddBuildSpec('Android Builder', 'android', target_bits=32) |
| 119 _AddBuildSpec('Android arm64 Builder', 'android') | 125 _AddBuildSpec('Android arm64 Builder', 'android') |
| 120 _AddBuildSpec('Win Builder', 'win', target_bits=32) | 126 _AddBuildSpec('Win Builder', 'win', target_bits=32) |
| 121 _AddBuildSpec('Win x64 Builder', 'win') | 127 _AddBuildSpec('Win x64 Builder', 'win') |
| 122 _AddBuildSpec('Mac Builder', 'mac') | 128 _AddBuildSpec('Mac Builder', 'mac') |
| 123 _AddBuildSpec('Linux Builder', 'linux') | 129 _AddBuildSpec('Linux Builder', 'linux', add_to_bisect=True) |
| 124 | 130 |
| 125 | 131 |
| 126 _AddTestSpec('Android Galaxy S5 Perf', 'android-galaxy-s5', 'android', | 132 _AddTestSpec('Android Galaxy S5 Perf', 'android-galaxy-s5', 'android', |
| 127 target_bits=32, num_device_shards=7, num_host_shards=3) | 133 target_bits=32, num_device_shards=7, num_host_shards=3) |
| 128 _AddTestSpec('Android Nexus5 Perf', 'android-nexus5', 'android', | 134 _AddTestSpec('Android Nexus5 Perf', 'android-nexus5', 'android', |
| 129 target_bits=32, num_device_shards=7, num_host_shards=3) | 135 target_bits=32, num_device_shards=7, num_host_shards=3) |
| 130 _AddTestSpec('Android Nexus5X Perf', 'android-nexus5X', 'android', | 136 _AddTestSpec('Android Nexus5X Perf', 'android-nexus5X', 'android', |
| 131 target_bits=32, num_device_shards=7, num_host_shards=3) | 137 target_bits=32, num_device_shards=7, num_host_shards=3) |
| 132 _AddTestSpec('Android Nexus6 Perf', 'android-nexus6', 'android', | 138 _AddTestSpec('Android Nexus6 Perf', 'android-nexus6', 'android', |
| 133 target_bits=32, num_device_shards=7, num_host_shards=3) | 139 target_bits=32, num_device_shards=7, num_host_shards=3) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 162 _AddTestSpec('Mac 10.10 Perf', 'chromium-rel-mac10', 'mac', | 168 _AddTestSpec('Mac 10.10 Perf', 'chromium-rel-mac10', 'mac', |
| 163 num_host_shards=5) | 169 num_host_shards=5) |
| 164 _AddTestSpec('Mac Retina Perf', 'chromium-rel-mac-retina', 'mac', | 170 _AddTestSpec('Mac Retina Perf', 'chromium-rel-mac-retina', 'mac', |
| 165 num_host_shards=5) | 171 num_host_shards=5) |
| 166 _AddTestSpec('Mac HDD Perf', 'chromium-rel-mac-hdd', 'mac', | 172 _AddTestSpec('Mac HDD Perf', 'chromium-rel-mac-hdd', 'mac', |
| 167 num_host_shards=5) | 173 num_host_shards=5) |
| 168 | 174 |
| 169 | 175 |
| 170 _AddTestSpec('Linux Perf', 'linux-release', 'linux', | 176 _AddTestSpec('Linux Perf', 'linux-release', 'linux', |
| 171 num_host_shards=5) | 177 num_host_shards=5) |
| OLD | NEW |