Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: scripts/slave/recipe_modules/chromium_tests/chromium_perf.py

Issue 2030713004: Refactor chromium.perf recipe configs. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@2-refactorr
Patch Set: Rebase, hope it's right :) Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 }, 17 },
18 } 18 }
19 19
20 20
21 def _BaseSpec(bot_type, chromium_apply_config, disable_tests, 21 def _BaseSpec(bot_type, chromium_config, disable_tests,
22 gclient_config, platform, target_bits, tests): 22 platform, target_bits, tests):
23 return { 23 spec = {
24 'bot_type': bot_type, 24 'bot_type': bot_type,
25 'chromium_apply_config' : chromium_apply_config, 25 'chromium_config': chromium_config,
26 'chromium_config': 'chromium_official',
27 'chromium_config_kwargs': { 26 'chromium_config_kwargs': {
28 'BUILD_CONFIG': 'Release', 27 'BUILD_CONFIG': 'Release',
29 'TARGET_BITS': target_bits, 28 'TARGET_BITS': target_bits,
30 }, 29 },
31 'disable_tests': disable_tests, 30 'disable_tests': disable_tests,
32 'gclient_config': gclient_config, 31 'gclient_config': 'chromium_perf',
33 'testing': { 32 'testing': {
34 'platform': 'linux' if platform == 'android' else platform, 33 'platform': 'linux' if platform == 'android' else platform,
35 }, 34 },
36 'tests': tests, 35 'tests': tests,
37 } 36 }
38 37
38 if platform == 'android':
39 spec['android_config'] = 'chromium_perf'
40 spec['chromium_apply_config'] = ['android']
41 spec['chromium_config_kwargs']['TARGET_ARCH'] = 'arm'
42 spec['chromium_config_kwargs']['TARGET_PLATFORM'] = 'android'
43 spec['gclient_apply_config'] = ['android']
39 44
40 def BuildSpec(perf_id, platform, target_bits): 45 return spec
46
47
48 def BuildSpec(chromium_config, perf_id, platform, target_bits):
41 if platform == 'android': 49 if platform == 'android':
50 # TODO: Run sizes on Android.
42 tests = [] 51 tests = []
43 else: 52 else:
44 tests = [steps.SizesStep('https://chromeperf.appspot.com', perf_id)] 53 tests = [steps.SizesStep('https://chromeperf.appspot.com', perf_id)]
45 54
46 spec = _BaseSpec( 55 spec = _BaseSpec(
47 bot_type='builder', 56 bot_type='builder',
48 chromium_apply_config=['mb', 'chromium_perf', 'goma_hermetic_fallback'], 57 chromium_config=chromium_config,
49 disable_tests=True, 58 disable_tests=True,
50 gclient_config='chromium',
51 platform=platform, 59 platform=platform,
52 target_bits=target_bits, 60 target_bits=target_bits,
53 tests=tests) 61 tests=tests)
54 62
55 if platform == 'android': 63 spec['compile_targets'] = ['chromium_builder_perf']
56 spec['chromium_apply_config'].append('android')
57 spec['chromium_config_kwargs']['TARGET_ARCH'] = 'arm'
58 spec['gclient_apply_config'] = ['android', 'perf']
59 else:
60 spec['compile_targets'] = ['chromium_builder_perf']
61 spec['gclient_apply_config'] = ['chrome_internal']
62 64
63 return spec 65 return spec
64 66
65 67
66 def _TestSpec(parent_builder, perf_id, platform, target_bits, max_battery_temp, 68 def _TestSpec(chromium_config, parent_builder, perf_id, platform, target_bits,
67 shard_index, num_host_shards, num_device_shards): 69 max_battery_temp, shard_index, num_host_shards,
70 num_device_shards):
68 spec = _BaseSpec( 71 spec = _BaseSpec(
69 bot_type='tester', 72 bot_type='tester',
70 chromium_apply_config=['chromium_perf'], 73 chromium_config=chromium_config,
71 disable_tests=platform == 'android', 74 disable_tests=platform == 'android',
72 gclient_config='perf',
73 platform=platform, 75 platform=platform,
74 target_bits=target_bits, 76 target_bits=target_bits,
75 tests=[steps.DynamicPerfTests( 77 tests=[steps.DynamicPerfTests(
76 perf_id, platform, target_bits, max_battery_temp=max_battery_temp, 78 perf_id, platform, target_bits, max_battery_temp=max_battery_temp,
77 num_device_shards=num_device_shards, num_host_shards=num_host_shards, 79 num_device_shards=num_device_shards, num_host_shards=num_host_shards,
78 shard_index=shard_index)], 80 shard_index=shard_index)],
79 ) 81 )
80 82
81 spec['parent_buildername'] = parent_builder 83 spec['parent_buildername'] = parent_builder
82 spec['perf-id'] = perf_id 84 spec['perf-id'] = perf_id
83 spec['results-url'] = 'https://chromeperf.appspot.com' 85 spec['results-url'] = 'https://chromeperf.appspot.com'
84 86
85 if platform == 'android': 87 if platform != 'android':
86 spec['android_config'] = 'perf' 88 # TODO: Remove disable_tests and run test_generators on Android.
87 spec['chromium_config_kwargs']['TARGET_PLATFORM'] = 'android'
88 spec['gclient_apply_config'] = ['android']
89 else:
90 spec['test_generators'] = [steps.generate_script] 89 spec['test_generators'] = [steps.generate_script]
91 spec['test_spec_file'] = 'chromium.perf.json' 90 spec['test_spec_file'] = 'chromium.perf.json'
92 91
93 return spec 92 return spec
94 93
95 94
96 def _AddBuildSpec(name, platform, target_bits=64): 95 def _AddBuildSpec(name, platform, target_bits=64):
97 if target_bits == 64: 96 if target_bits == 64:
98 perf_id = platform 97 perf_id = platform
99 else: 98 else:
100 perf_id = '%s-%d' % (platform, target_bits) 99 perf_id = '%s-%d' % (platform, target_bits)
101 100
102 SPEC['builders'][name] = BuildSpec(perf_id, platform, target_bits) 101 SPEC['builders'][name] = BuildSpec(
102 'chromium_perf', 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(
113 parent_builder, perf_id, platform, target_bits, max_battery_temp, 113 'chromium_perf', parent_builder, perf_id, platform, target_bits,
114 shard_index, num_host_shards, num_device_shards) 114 max_battery_temp, shard_index, num_host_shards, num_device_shards)
115 115
116 116
117 _AddBuildSpec('Android Builder', 'android', target_bits=32) 117 _AddBuildSpec('Android Builder', 'android', target_bits=32)
118 _AddBuildSpec('Android arm64 Builder', 'android') 118 _AddBuildSpec('Android arm64 Builder', 'android')
119 _AddBuildSpec('Win Builder', 'win', target_bits=32) 119 _AddBuildSpec('Win Builder', 'win', target_bits=32)
120 _AddBuildSpec('Win x64 Builder', 'win') 120 _AddBuildSpec('Win x64 Builder', 'win')
121 _AddBuildSpec('Mac Builder', 'mac') 121 _AddBuildSpec('Mac Builder', 'mac')
122 _AddBuildSpec('Linux Builder', 'linux') 122 _AddBuildSpec('Linux Builder', 'linux')
123 123
124 124
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698