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

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

Issue 1972023002: Refactor chromium_tests tryserver.chromium.perf builder spec. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@sizes
Patch Set: Created 4 years, 7 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)
(...skipping 19 matching lines...) Expand all
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
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 known_devices_file='.known_devices'): 109 known_devices_file='.known_devices'):
110 parent_builder = _builders[platform][target_bits] 110 parent_builder = _builders[platform][target_bits]
111 for shard_index in xrange(num_host_shards): 111 for shard_index in xrange(num_host_shards):
112 builder_name = '%s (%d)' % (name, shard_index + 1) 112 builder_name = '%s (%d)' % (name, shard_index + 1)
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 _AddTestSpec('Mac 10.10 Perf', 'chromium-rel-mac10', 'mac', 164 _AddTestSpec('Mac 10.10 Perf', 'chromium-rel-mac10', 'mac',
165 num_host_shards=5) 165 num_host_shards=5)
166 _AddTestSpec('Mac Retina Perf', 'chromium-rel-mac-retina', 'mac', 166 _AddTestSpec('Mac Retina Perf', 'chromium-rel-mac-retina', 'mac',
167 num_host_shards=5) 167 num_host_shards=5)
168 _AddTestSpec('Mac HDD Perf', 'chromium-rel-mac-hdd', 'mac', 168 _AddTestSpec('Mac HDD Perf', 'chromium-rel-mac-hdd', 'mac',
169 num_host_shards=5) 169 num_host_shards=5)
170 170
171 171
172 _AddTestSpec('Linux Perf', 'linux-release', 'linux', 172 _AddTestSpec('Linux Perf', 'linux-release', 'linux',
173 num_host_shards=5) 173 num_host_shards=5)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698