| 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 import DEPS |
| 10 CHROMIUM_CONFIG_CTX = DEPS['chromium'].CONFIG_CTX |
| 11 GCLIENT_CONFIG_CTX = DEPS['gclient'].CONFIG_CTX |
| 9 | 12 |
| 10 _builders = collections.defaultdict(dict) | 13 |
| 14 builders = collections.defaultdict(dict) |
| 11 | 15 |
| 12 | 16 |
| 13 SPEC = { | 17 SPEC = { |
| 14 'builders': {}, | 18 'builders': {}, |
| 15 'settings': { | 19 'settings': { |
| 16 'build_gs_bucket': 'chrome-perf', | 20 'build_gs_bucket': 'chrome-perf', |
| 17 # Bucket for storing builds for manual bisect | 21 # Bucket for storing builds for manual bisect |
| 18 'bisect_build_gs_bucket': 'chrome-test-builds', | 22 'bisect_build_gs_bucket': 'chrome-test-builds', |
| 19 'bisect_build_gs_extra': 'official-by-commit', | 23 'bisect_build_gs_extra': 'official-by-commit', |
| 20 'bisect_builders': [] | 24 'bisect_builders': [] |
| 21 }, | 25 }, |
| 22 } | 26 } |
| 23 | 27 |
| 24 | 28 |
| 29 @CHROMIUM_CONFIG_CTX(includes=['chromium', 'official', 'mb']) |
| 30 def chromium_perf(c): |
| 31 c.clobber_before_runhooks = False |
| 32 pass |
| 33 |
| 34 |
| 25 def _BaseSpec(bot_type, config_name, disable_tests, | 35 def _BaseSpec(bot_type, config_name, disable_tests, |
| 26 platform, target_bits, tests): | 36 platform, target_bits, tests): |
| 27 spec = { | 37 spec = { |
| 28 'bot_type': bot_type, | 38 'bot_type': bot_type, |
| 29 'chromium_config': config_name, | 39 'chromium_config': config_name, |
| 30 'chromium_config_kwargs': { | 40 'chromium_config_kwargs': { |
| 31 'BUILD_CONFIG': 'Release', | 41 'BUILD_CONFIG': 'Release', |
| 32 'TARGET_BITS': target_bits, | 42 'TARGET_BITS': target_bits, |
| 33 }, | 43 }, |
| 34 'disable_tests': disable_tests, | 44 'disable_tests': disable_tests, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 63 platform=platform, | 73 platform=platform, |
| 64 target_bits=target_bits, | 74 target_bits=target_bits, |
| 65 tests=tests, | 75 tests=tests, |
| 66 ) | 76 ) |
| 67 | 77 |
| 68 spec['compile_targets'] = ['chromium_builder_perf'] | 78 spec['compile_targets'] = ['chromium_builder_perf'] |
| 69 | 79 |
| 70 return spec | 80 return spec |
| 71 | 81 |
| 72 | 82 |
| 73 def _TestSpec(config_name, parent_builder, perf_id, platform, target_bits, | 83 def TestSpec(config_name, parent_buildername, perf_id, platform, target_bits, |
| 74 max_battery_temp, shard_index, num_host_shards, | 84 shard_index, num_host_shards, num_device_shards): |
| 75 num_device_shards): | |
| 76 spec = _BaseSpec( | 85 spec = _BaseSpec( |
| 77 bot_type='tester', | 86 bot_type='tester', |
| 78 config_name=config_name, | 87 config_name=config_name, |
| 79 disable_tests=platform == 'android', | 88 disable_tests=platform == 'android', |
| 80 platform=platform, | 89 platform=platform, |
| 81 target_bits=target_bits, | 90 target_bits=target_bits, |
| 82 tests=[steps.DynamicPerfTests( | 91 tests=[steps.DynamicPerfTests( |
| 83 perf_id, platform, target_bits, max_battery_temp=max_battery_temp, | 92 perf_id, platform, target_bits, max_battery_temp=350, |
| 84 num_device_shards=num_device_shards, num_host_shards=num_host_shards, | 93 num_device_shards=num_device_shards, num_host_shards=num_host_shards, |
| 85 shard_index=shard_index)], | 94 shard_index=shard_index)], |
| 86 ) | 95 ) |
| 87 | 96 |
| 88 spec['parent_buildername'] = parent_builder | 97 spec['parent_buildername'] = parent_buildername |
| 89 spec['perf-id'] = perf_id | 98 spec['perf-id'] = perf_id |
| 90 spec['results-url'] = 'https://chromeperf.appspot.com' | 99 spec['results-url'] = 'https://chromeperf.appspot.com' |
| 91 | 100 |
| 92 if platform != 'android': | 101 if platform != 'android': |
| 93 # TODO: Remove disable_tests and run test_generators on Android. | 102 # TODO: Remove disable_tests and run test_generators on Android. |
| 94 spec['test_generators'] = [steps.generate_script] | 103 spec['test_generators'] = [steps.generate_script] |
| 95 spec['test_spec_file'] = 'chromium.perf.json' | 104 spec['test_spec_file'] = 'chromium.perf.json' |
| 96 | 105 |
| 97 return spec | 106 return spec |
| 98 | 107 |
| 99 | 108 |
| 100 def _AddBuildSpec(name, platform, target_bits=64, add_to_bisect=False): | 109 def _AddBuildSpec(name, platform, target_bits=64, add_to_bisect=False): |
| 101 if target_bits == 64: | 110 if target_bits == 64: |
| 102 perf_id = platform | 111 perf_id = platform |
| 103 else: | 112 else: |
| 104 perf_id = '%s-%d' % (platform, target_bits) | 113 perf_id = '%s-%d' % (platform, target_bits) |
| 105 | 114 |
| 106 SPEC['builders'][name] = BuildSpec( | 115 SPEC['builders'][name] = BuildSpec( |
| 107 'chromium_perf', perf_id, platform, target_bits) | 116 'chromium_perf', perf_id, platform, target_bits) |
| 108 assert target_bits not in _builders[platform] | 117 assert target_bits not in builders[platform] |
| 109 _builders[platform][target_bits] = name | 118 builders[platform][target_bits] = name |
| 110 if add_to_bisect: | 119 if add_to_bisect: |
| 111 SPEC['settings']['bisect_builders'].append(name) | 120 SPEC['settings']['bisect_builders'].append(name) |
| 112 | 121 |
| 113 | 122 |
| 114 def _AddTestSpec(name, perf_id, platform, target_bits=64, | 123 def _AddTestSpec(name, perf_id, platform, target_bits=64, |
| 115 max_battery_temp=350, num_host_shards=1, num_device_shards=1): | 124 num_host_shards=1, num_device_shards=1): |
| 116 parent_builder = _builders[platform][target_bits] | 125 parent_buildername = builders[platform][target_bits] |
| 117 for shard_index in xrange(num_host_shards): | 126 for shard_index in xrange(num_host_shards): |
| 118 builder_name = '%s (%d)' % (name, shard_index + 1) | 127 builder_name = '%s (%d)' % (name, shard_index + 1) |
| 119 SPEC['builders'][builder_name] = _TestSpec( | 128 SPEC['builders'][builder_name] = TestSpec( |
| 120 'chromium_perf', parent_builder, perf_id, platform, target_bits, | 129 'chromium_perf', parent_buildername, perf_id, platform, target_bits, |
| 121 max_battery_temp, shard_index, num_host_shards, num_device_shards) | 130 shard_index, num_host_shards, num_device_shards) |
| 122 | 131 |
| 123 | 132 |
| 124 _AddBuildSpec('Android Builder', 'android', target_bits=32) | 133 _AddBuildSpec('Android Builder', 'android', target_bits=32) |
| 125 _AddBuildSpec('Android arm64 Builder', 'android') | 134 _AddBuildSpec('Android arm64 Builder', 'android') |
| 126 _AddBuildSpec('Win Builder', 'win', target_bits=32) | 135 _AddBuildSpec('Win Builder', 'win', target_bits=32) |
| 127 _AddBuildSpec('Win x64 Builder', 'win') | 136 _AddBuildSpec('Win x64 Builder', 'win') |
| 128 _AddBuildSpec('Mac Builder', 'mac') | 137 _AddBuildSpec('Mac Builder', 'mac') |
| 129 _AddBuildSpec('Linux Builder', 'linux', add_to_bisect=True) | 138 _AddBuildSpec('Linux Builder', 'linux', add_to_bisect=True) |
| 130 | 139 |
| 131 | 140 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 _AddTestSpec('Mac 10.10 Perf', 'chromium-rel-mac10', 'mac', | 177 _AddTestSpec('Mac 10.10 Perf', 'chromium-rel-mac10', 'mac', |
| 169 num_host_shards=5) | 178 num_host_shards=5) |
| 170 _AddTestSpec('Mac Retina Perf', 'chromium-rel-mac-retina', 'mac', | 179 _AddTestSpec('Mac Retina Perf', 'chromium-rel-mac-retina', 'mac', |
| 171 num_host_shards=5) | 180 num_host_shards=5) |
| 172 _AddTestSpec('Mac HDD Perf', 'chromium-rel-mac-hdd', 'mac', | 181 _AddTestSpec('Mac HDD Perf', 'chromium-rel-mac-hdd', 'mac', |
| 173 num_host_shards=5) | 182 num_host_shards=5) |
| 174 | 183 |
| 175 | 184 |
| 176 _AddTestSpec('Linux Perf', 'linux-release', 'linux', | 185 _AddTestSpec('Linux Perf', 'linux-release', 'linux', |
| 177 num_host_shards=5) | 186 num_host_shards=5) |
| OLD | NEW |