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) |
(...skipping 19 matching lines...) Expand all Loading... |
30 }, | 30 }, |
31 'disable_tests': disable_tests, | 31 'disable_tests': disable_tests, |
32 'gclient_config': gclient_config, | 32 'gclient_config': gclient_config, |
33 'testing': { | 33 'testing': { |
34 'platform': 'linux' if platform == 'android' else platform, | 34 'platform': 'linux' if platform == 'android' else platform, |
35 }, | 35 }, |
36 'tests': tests, | 36 'tests': tests, |
37 } | 37 } |
38 | 38 |
39 | 39 |
40 def _BuildSpec(platform, target_bits): | 40 def BuildSpec(perf_id, platform, target_bits): |
41 if target_bits == 64: | |
42 perf_id = platform | |
43 else: | |
44 perf_id = '%s-%d' % (platform, target_bits) | |
45 | |
46 if platform == 'android': | 41 if platform == 'android': |
47 tests = [] | 42 tests = [] |
48 else: | 43 else: |
49 tests = [steps.SizesStep('https://chromeperf.appspot.com', perf_id)] | 44 tests = [steps.SizesStep('https://chromeperf.appspot.com', perf_id)] |
50 | 45 |
51 spec = _BaseSpec( | 46 spec = _BaseSpec( |
52 bot_type='builder', | 47 bot_type='builder', |
53 chromium_apply_config=['mb', 'chromium_perf', 'goma_hermetic_fallback'], | 48 chromium_apply_config=['mb', 'chromium_perf', 'goma_hermetic_fallback'], |
54 disable_tests=True, | 49 disable_tests=True, |
55 gclient_config='chromium', | 50 gclient_config='chromium', |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 spec['chromium_config_kwargs']['TARGET_PLATFORM'] = 'android' | 87 spec['chromium_config_kwargs']['TARGET_PLATFORM'] = 'android' |
93 spec['gclient_apply_config'] = ['android'] | 88 spec['gclient_apply_config'] = ['android'] |
94 else: | 89 else: |
95 spec['test_generators'] = [steps.generate_script] | 90 spec['test_generators'] = [steps.generate_script] |
96 spec['test_spec_file'] = 'chromium.perf.json' | 91 spec['test_spec_file'] = 'chromium.perf.json' |
97 | 92 |
98 return spec | 93 return spec |
99 | 94 |
100 | 95 |
101 def _AddBuildSpec(name, platform, target_bits=64): | 96 def _AddBuildSpec(name, platform, target_bits=64): |
102 SPEC['builders'][name] = _BuildSpec(platform, target_bits) | 97 if target_bits == 64: |
| 98 perf_id = platform |
| 99 else: |
| 100 perf_id = '%s-%d' % (platform, target_bits) |
| 101 |
| 102 SPEC['builders'][name] = BuildSpec(perf_id, platform, target_bits) |
103 assert target_bits not in _builders[platform] | 103 assert target_bits not in _builders[platform] |
104 _builders[platform][target_bits] = name | 104 _builders[platform][target_bits] = name |
105 | 105 |
106 | 106 |
107 def _AddTestSpec(name, perf_id, platform, target_bits=64, | 107 def _AddTestSpec(name, perf_id, platform, target_bits=64, |
108 max_battery_temp=350, num_host_shards=1, num_device_shards=1): | 108 max_battery_temp=350, num_host_shards=1, num_device_shards=1): |
109 parent_builder = _builders[platform][target_bits] | 109 parent_builder = _builders[platform][target_bits] |
110 for shard_index in xrange(num_host_shards): | 110 for shard_index in xrange(num_host_shards): |
111 builder_name = '%s (%d)' % (name, shard_index + 1) | 111 builder_name = '%s (%d)' % (name, shard_index + 1) |
112 SPEC['builders'][builder_name] = _TestSpec( | 112 SPEC['builders'][builder_name] = _TestSpec( |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 _AddTestSpec('Mac 10.10 Perf', 'chromium-rel-mac10', 'mac', | 161 _AddTestSpec('Mac 10.10 Perf', 'chromium-rel-mac10', 'mac', |
162 num_host_shards=5) | 162 num_host_shards=5) |
163 _AddTestSpec('Mac Retina Perf', 'chromium-rel-mac-retina', 'mac', | 163 _AddTestSpec('Mac Retina Perf', 'chromium-rel-mac-retina', 'mac', |
164 num_host_shards=5) | 164 num_host_shards=5) |
165 _AddTestSpec('Mac HDD Perf', 'chromium-rel-mac-hdd', 'mac', | 165 _AddTestSpec('Mac HDD Perf', 'chromium-rel-mac-hdd', 'mac', |
166 num_host_shards=5) | 166 num_host_shards=5) |
167 | 167 |
168 | 168 |
169 _AddTestSpec('Linux Perf', 'linux-release', 'linux', | 169 _AddTestSpec('Linux Perf', 'linux-release', 'linux', |
170 num_host_shards=5) | 170 num_host_shards=5) |
OLD | NEW |