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 | 9 import DEPS |
10 CHROMIUM_CONFIG_CTX = DEPS['chromium'].CONFIG_CTX | 10 CHROMIUM_CONFIG_CTX = DEPS['chromium'].CONFIG_CTX |
(...skipping 14 matching lines...) Expand all Loading... |
25 }, | 25 }, |
26 } | 26 } |
27 | 27 |
28 | 28 |
29 @CHROMIUM_CONFIG_CTX(includes=['chromium', 'official', 'mb']) | 29 @CHROMIUM_CONFIG_CTX(includes=['chromium', 'official', 'mb']) |
30 def chromium_perf(c): | 30 def chromium_perf(c): |
31 c.clobber_before_runhooks = False | 31 c.clobber_before_runhooks = False |
32 pass | 32 pass |
33 | 33 |
34 | 34 |
35 def _BaseSpec(bot_type, config_name, disable_tests, | 35 def _BaseSpec(bot_type, config_name, platform, target_bits, tests): |
36 platform, target_bits, tests): | |
37 spec = { | 36 spec = { |
38 'bot_type': bot_type, | 37 'bot_type': bot_type, |
39 'chromium_config': config_name, | 38 'chromium_config': config_name, |
40 'chromium_config_kwargs': { | 39 'chromium_config_kwargs': { |
41 'BUILD_CONFIG': 'Release', | 40 'BUILD_CONFIG': 'Release', |
42 'TARGET_BITS': target_bits, | 41 'TARGET_BITS': target_bits, |
43 }, | 42 }, |
44 'disable_tests': disable_tests, | |
45 'gclient_config': config_name, | 43 'gclient_config': config_name, |
46 'testing': { | 44 'testing': { |
47 'platform': 'linux' if platform == 'android' else platform, | 45 'platform': 'linux' if platform == 'android' else platform, |
48 }, | 46 }, |
49 'tests': tests, | 47 'tests': tests, |
50 } | 48 } |
51 | 49 |
52 if platform == 'android': | 50 if platform == 'android': |
53 spec['android_config'] = 'chromium_perf' | 51 spec['android_config'] = 'chromium_perf' |
54 spec['chromium_apply_config'] = ['android'] | 52 spec['chromium_apply_config'] = ['android'] |
55 spec['chromium_config_kwargs']['TARGET_ARCH'] = 'arm' | 53 spec['chromium_config_kwargs']['TARGET_ARCH'] = 'arm' |
56 spec['chromium_config_kwargs']['TARGET_PLATFORM'] = 'android' | 54 spec['chromium_config_kwargs']['TARGET_PLATFORM'] = 'android' |
57 spec['gclient_apply_config'] = ['android'] | 55 spec['gclient_apply_config'] = ['android'] |
58 | 56 |
59 return spec | 57 return spec |
60 | 58 |
61 | 59 |
62 def BuildSpec(config_name, perf_id, platform, target_bits): | 60 def BuildSpec(config_name, perf_id, platform, target_bits): |
63 if platform == 'android': | 61 if platform == 'android': |
64 # TODO: Run sizes on Android. | 62 # TODO: Run sizes on Android. |
65 tests = [] | 63 tests = [] |
66 else: | 64 else: |
67 tests = [steps.SizesStep('https://chromeperf.appspot.com', perf_id)] | 65 tests = [steps.SizesStep('https://chromeperf.appspot.com', perf_id)] |
68 | 66 |
69 spec = _BaseSpec( | 67 spec = _BaseSpec( |
70 bot_type='builder', | 68 bot_type='builder', |
71 config_name=config_name, | 69 config_name=config_name, |
72 disable_tests=True, | |
73 platform=platform, | 70 platform=platform, |
74 target_bits=target_bits, | 71 target_bits=target_bits, |
75 tests=tests, | 72 tests=tests, |
76 ) | 73 ) |
77 | 74 |
78 spec['compile_targets'] = ['chromium_builder_perf'] | 75 spec['compile_targets'] = ['chromium_builder_perf'] |
79 | 76 |
80 return spec | 77 return spec |
81 | 78 |
82 | 79 |
83 def TestSpec(config_name, parent_buildername, perf_id, platform, target_bits, | 80 def TestSpec(config_name, platform, target_bits, |
84 shard_index, num_host_shards, num_device_shards): | 81 parent_buildername=None, tests=None): |
85 spec = _BaseSpec( | 82 spec = _BaseSpec( |
86 bot_type='tester', | 83 bot_type='tester', |
87 config_name=config_name, | 84 config_name=config_name, |
88 disable_tests=platform == 'android', | |
89 platform=platform, | 85 platform=platform, |
90 target_bits=target_bits, | 86 target_bits=target_bits, |
91 tests=[steps.DynamicPerfTests( | 87 tests=tests or [], |
92 perf_id, platform, target_bits, max_battery_temp=350, | |
93 num_device_shards=num_device_shards, num_host_shards=num_host_shards, | |
94 shard_index=shard_index)], | |
95 ) | 88 ) |
96 | 89 |
| 90 if not parent_buildername: |
| 91 parent_buildername = builders[platform][target_bits] |
97 spec['parent_buildername'] = parent_buildername | 92 spec['parent_buildername'] = parent_buildername |
98 spec['perf-id'] = perf_id | 93 spec['test_generators'] = [steps.generate_script] |
99 spec['results-url'] = 'https://chromeperf.appspot.com' | |
100 | |
101 if platform != 'android': | |
102 # TODO: Remove disable_tests and run test_generators on Android. | |
103 spec['test_generators'] = [steps.generate_script] | |
104 spec['test_spec_file'] = 'chromium.perf.json' | |
105 | 94 |
106 return spec | 95 return spec |
107 | 96 |
108 | 97 |
109 def _AddBuildSpec(name, platform, target_bits=64, add_to_bisect=False): | 98 def _AddBuildSpec(name, platform, target_bits=64, add_to_bisect=False): |
110 if target_bits == 64: | 99 if target_bits == 64: |
111 perf_id = platform | 100 perf_id = platform |
112 else: | 101 else: |
113 perf_id = '%s-%d' % (platform, target_bits) | 102 perf_id = '%s-%d' % (platform, target_bits) |
114 | 103 |
115 SPEC['builders'][name] = BuildSpec( | 104 SPEC['builders'][name] = BuildSpec( |
116 'chromium_perf', perf_id, platform, target_bits) | 105 'chromium_perf', perf_id, platform, target_bits) |
117 assert target_bits not in builders[platform] | 106 assert target_bits not in builders[platform] |
118 builders[platform][target_bits] = name | 107 builders[platform][target_bits] = name |
119 if add_to_bisect: | 108 if add_to_bisect: |
120 SPEC['settings']['bisect_builders'].append(name) | 109 SPEC['settings']['bisect_builders'].append(name) |
121 | 110 |
122 | 111 |
123 def _AddTestSpec(name, perf_id, platform, target_bits=64, | 112 def _AddTestSpec(name, perf_id, platform, target_bits=64, |
124 num_host_shards=1, num_device_shards=1): | 113 num_host_shards=1, num_device_shards=1): |
125 parent_buildername = builders[platform][target_bits] | |
126 for shard_index in xrange(num_host_shards): | 114 for shard_index in xrange(num_host_shards): |
127 builder_name = '%s (%d)' % (name, shard_index + 1) | 115 builder_name = '%s (%d)' % (name, shard_index + 1) |
| 116 tests = [steps.DynamicPerfTests( |
| 117 perf_id, platform, target_bits, num_device_shards=num_device_shards, |
| 118 num_host_shards=num_host_shards, shard_index=shard_index)] |
128 SPEC['builders'][builder_name] = TestSpec( | 119 SPEC['builders'][builder_name] = TestSpec( |
129 'chromium_perf', parent_buildername, perf_id, platform, target_bits, | 120 'chromium_perf', platform, target_bits, tests=tests) |
130 shard_index, num_host_shards, num_device_shards) | |
131 | 121 |
132 | 122 |
133 _AddBuildSpec('Android Builder', 'android', target_bits=32) | 123 _AddBuildSpec('Android Builder', 'android', target_bits=32) |
134 _AddBuildSpec('Android arm64 Builder', 'android') | 124 _AddBuildSpec('Android arm64 Builder', 'android') |
135 _AddBuildSpec('Win Builder', 'win', target_bits=32) | 125 _AddBuildSpec('Win Builder', 'win', target_bits=32) |
136 _AddBuildSpec('Win x64 Builder', 'win', add_to_bisect=True) | 126 _AddBuildSpec('Win x64 Builder', 'win', add_to_bisect=True) |
137 _AddBuildSpec('Mac Builder', 'mac', add_to_bisect=True) | 127 _AddBuildSpec('Mac Builder', 'mac', add_to_bisect=True) |
138 _AddBuildSpec('Linux Builder', 'linux', add_to_bisect=True) | 128 _AddBuildSpec('Linux Builder', 'linux', add_to_bisect=True) |
139 | 129 |
140 | 130 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 _AddTestSpec('Mac 10.10 Perf', 'chromium-rel-mac10', 'mac', | 169 _AddTestSpec('Mac 10.10 Perf', 'chromium-rel-mac10', 'mac', |
180 num_host_shards=5) | 170 num_host_shards=5) |
181 _AddTestSpec('Mac Retina Perf', 'chromium-rel-mac-retina', 'mac', | 171 _AddTestSpec('Mac Retina Perf', 'chromium-rel-mac-retina', 'mac', |
182 num_host_shards=5) | 172 num_host_shards=5) |
183 _AddTestSpec('Mac HDD Perf', 'chromium-rel-mac-hdd', 'mac', | 173 _AddTestSpec('Mac HDD Perf', 'chromium-rel-mac-hdd', 'mac', |
184 num_host_shards=5) | 174 num_host_shards=5) |
185 | 175 |
186 | 176 |
187 _AddTestSpec('Linux Perf', 'linux-release', 'linux', | 177 _AddTestSpec('Linux Perf', 'linux-release', 'linux', |
188 num_host_shards=5) | 178 num_host_shards=5) |
OLD | NEW |