This repository has been archived by the owner on Feb 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
thunderbird_config.py
314 lines (269 loc) · 11.1 KB
/
thunderbird_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
from copy import deepcopy
from config import BRANCH_UNITTEST_VARS
from localconfig import SLAVES, TRY_SLAVES, GLOBAL_VARS
import thunderbird_localconfig
reload(thunderbird_localconfig)
GLOBAL_VARS = deepcopy(GLOBAL_VARS)
BRANCH_UNITTEST_VARS = deepcopy(BRANCH_UNITTEST_VARS)
GLOBAL_VARS['stage_username'] = 'tbirdbld'
GLOBAL_VARS.update(thunderbird_localconfig.GLOBAL_VARS.copy())
BRANCHES = {
'comm-central': {
},
'comm-release': {
},
'comm-beta': {
},
'comm-aurora': {
},
'comm-esr17': {
},
'try-comm-central': {
'coallesce_jobs': False
},
}
PLATFORMS = {
'macosx64': {},
'win32': {},
'linux': {},
'linux64': {},
}
builder_prefix = "TB "
PLATFORMS['macosx64']['slave_platforms'] = ['snowleopard', 'lion', 'mountainlion']
PLATFORMS['macosx64']['env_name'] = 'mac-perf'
PLATFORMS['macosx64']['snowleopard'] = {'name': builder_prefix + "Rev4 MacOSX Snow Leopard 10.6"}
PLATFORMS['macosx64']['lion'] = {'name': builder_prefix + "Rev4 MacOSX Lion 10.7"}
PLATFORMS['macosx64']['mountainlion'] = {'name': builder_prefix + "Rev5 MacOSX Mountain Lion 10.8"}
PLATFORMS['macosx64']['stage_product'] = 'thunderbird'
PLATFORMS['macosx64']['mozharness_python'] = '/tools/buildbot/bin/python'
PLATFORMS['win32']['slave_platforms'] = ['xp', 'win7']
PLATFORMS['win32']['env_name'] = 'win32-perf'
PLATFORMS['win32']['xp'] = {'name': builder_prefix + "Rev3 WINNT 5.1"}
PLATFORMS['win32']['win7'] = {'name': builder_prefix + "Rev3 WINNT 6.1"}
PLATFORMS['win32']['stage_product'] = 'thunderbird'
PLATFORMS['win32']['mozharness_python'] = ['c:/mozilla-build/python25/python', '-u']
PLATFORMS['linux']['slave_platforms'] = ['fedora']
PLATFORMS['linux']['env_name'] = 'linux-perf'
PLATFORMS['linux']['fedora'] = {'name': builder_prefix + "Rev3 Fedora 12"}
PLATFORMS['linux']['stage_product'] = 'thunderbird'
PLATFORMS['linux']['mozharness_python'] = '/tools/buildbot/bin/python'
PLATFORMS['linux64']['slave_platforms'] = ['fedora64']
PLATFORMS['linux64']['env_name'] = 'linux-perf'
PLATFORMS['linux64']['fedora64'] = {'name': builder_prefix + "Rev3 Fedora 12x64"}
PLATFORMS['linux64']['stage_product'] = 'thunderbird'
PLATFORMS['linux64']['mozharness_python'] = '/tools/buildbot/bin/python'
# Lets be explicit instead of magical.
for platform, platform_config in PLATFORMS.items():
for slave_platform in platform_config['slave_platforms']:
platform_config[slave_platform]['slaves'] = sorted(SLAVES[slave_platform])
if slave_platform in TRY_SLAVES:
platform_config[slave_platform]['try_slaves'] = sorted(TRY_SLAVES[slave_platform])
else:
platform_config[slave_platform]['try_slaves'] = platform_config[slave_platform]['slaves']
MOBILE_PLATFORMS = []
ALL_PLATFORMS = PLATFORMS['linux']['slave_platforms'] + \
PLATFORMS['linux64']['slave_platforms'] + \
PLATFORMS['win32']['slave_platforms'] + \
PLATFORMS['macosx64']['slave_platforms']
WIN7_ONLY = ['win7']
NO_WIN = PLATFORMS['macosx64']['slave_platforms'] + PLATFORMS['linux']['slave_platforms'] + PLATFORMS['linux64']['slave_platforms']
NO_MAC = PLATFORMS['linux']['slave_platforms'] + \
PLATFORMS['linux64']['slave_platforms'] + \
PLATFORMS['win32']['slave_platforms']
MAC_ONLY = PLATFORMS['macosx64']['slave_platforms']
SUITES = {}
BRANCH_UNITTEST_VARS = {
'hghost': 'hg.mozilla.org',
# turn on platforms as we get them running
'platforms': {
'linux': {},
'linux64': {},
'macosx64': {},
'win32': {},
},
}
# Default set of unit tests
UNITTEST_SUITES = {
'opt_unittest_suites': [
('xpcshell', ['xpcshell']),
('mozmill', ['mozmill']),
],
'debug_unittest_suites': [
('xpcshell', ['xpcshell']),
('mozmill', ['mozmill']),
],
}
# You must define opt_unittest_suites when enable_opt_unittests is True for a
# platform. Likewise debug_unittest_suites for enable_debug_unittests
PLATFORM_UNITTEST_VARS = {
'linux': {
'product_name': 'thunderbird',
'app_name': 'mail',
'brand_name': 'Daily',
'builds_before_reboot': 1,
'unittest-env': {'DISPLAY': ':0'},
'enable_opt_unittests': True,
'enable_debug_unittests': True,
'fedora': {
'opt_unittest_suites': UNITTEST_SUITES['opt_unittest_suites'][:],
'debug_unittest_suites': UNITTEST_SUITES['debug_unittest_suites'][:],
},
},
'linux64': {
'product_name': 'thunderbird',
'app_name': 'mail',
'brand_name': 'Daily',
'builds_before_reboot': 1,
'unittest-env': {'DISPLAY': ':0'},
'enable_opt_unittests': True,
'enable_debug_unittests': True,
'fedora64': {
'opt_unittest_suites': UNITTEST_SUITES['opt_unittest_suites'][:],
'debug_unittest_suites': UNITTEST_SUITES['debug_unittest_suites'][:],
},
},
'win32': {
'product_name': 'thunderbird',
'app_name': 'mail',
'brand_name': 'Daily',
'builds_before_reboot': 1,
'mochitest_leak_threshold': 484,
'crashtest_leak_threshold': 484,
'env_name': 'win32-perf-unittest',
'enable_opt_unittests': True,
'enable_debug_unittests': True,
'xp': {
'opt_unittest_suites': UNITTEST_SUITES['opt_unittest_suites'][:],
'debug_unittest_suites': UNITTEST_SUITES['debug_unittest_suites'][:],
},
'win7': {
'opt_unittest_suites': UNITTEST_SUITES['opt_unittest_suites'][:],
'debug_unittest_suites': UNITTEST_SUITES['debug_unittest_suites'][:],
},
},
'macosx64': {
'product_name': 'thunderbird',
'app_name': 'mail',
'brand_name': 'Daily',
'builds_before_reboot': 1,
'enable_opt_unittests': True,
'enable_debug_unittests': True,
'snowleopard': {
'opt_unittest_suites': UNITTEST_SUITES['opt_unittest_suites'][:],
'debug_unittest_suites': UNITTEST_SUITES['debug_unittest_suites'][:],
},
'lion': {
'opt_unittest_suites': UNITTEST_SUITES['opt_unittest_suites'][:],
'debug_unittest_suites': UNITTEST_SUITES['debug_unittest_suites'][:],
},
'mountainlion': {
'opt_unittest_suites': UNITTEST_SUITES['opt_unittest_suites'][:],
'debug_unittest_suites': UNITTEST_SUITES['debug_unittest_suites'][:],
},
},
}
# Copy project branches into BRANCHES keys
#for branch in ACTIVE_PROJECT_BRANCHES:
# BRANCHES[branch] = deepcopy(PROJECT_BRANCHES[branch])
# Copy unittest vars in first, then platform vars
for branch in BRANCHES.keys():
for key, value in GLOBAL_VARS.items():
# Don't override platforms if it's set
if key == 'platforms' and 'platforms' in BRANCHES[branch]:
continue
BRANCHES[branch][key] = deepcopy(value)
for key, value in BRANCH_UNITTEST_VARS.items():
# Don't override platforms if it's set and locked
if key == 'platforms' and 'platforms' in BRANCHES[branch] and BRANCHES[branch].get('lock_platforms'):
continue
BRANCHES[branch][key] = deepcopy(value)
for platform, platform_config in PLATFORM_UNITTEST_VARS.items():
if platform in BRANCHES[branch]['platforms']:
for key, value in platform_config.items():
value = deepcopy(value)
if isinstance(value, str):
value = value % locals()
BRANCHES[branch]['platforms'][platform][key] = value
# Copy in local config
if branch in thunderbird_localconfig.BRANCHES:
for key, value in thunderbird_localconfig.BRANCHES[branch].items():
if key == 'platforms':
# Merge in these values
if 'platforms' not in BRANCHES[branch]:
BRANCHES[branch]['platforms'] = {}
for platform, platform_config in value.items():
for key, value in platform_config.items():
value = deepcopy(value)
if isinstance(value, str):
value = value % locals()
BRANCHES[branch]['platforms'][platform][key] = value
else:
BRANCHES[branch][key] = deepcopy(value)
# # Merge in any project branch config for platforms
# if branch in ACTIVE_PROJECT_BRANCHES and PROJECT_BRANCHES[branch].has_key('platforms'):
# for platform, platform_config in PROJECT_BRANCHES[branch]['platforms'].items():
# if platform in PLATFORMS:
# for key, value in platform_config.items():
# value = deepcopy(value)
# if isinstance(value, str):
# value = value % locals()
# BRANCHES[branch]['platforms'][platform][key] = value
for platform, platform_config in thunderbird_localconfig.PLATFORM_VARS.items():
if platform in BRANCHES[branch]['platforms']:
for key, value in platform_config.items():
value = deepcopy(value)
if isinstance(value, str):
value = value % locals()
BRANCHES[branch]['platforms'][platform][key] = value
########
# Entries in BRANCHES for tests should be a tuple of:
# - Number of tests to run per build
# - Whether queue merging is on
# - TalosFactory options
# - Which platforms to run on
# Let's load the defaults
for branch in BRANCHES.keys():
BRANCHES[branch]['repo_path'] = branch
BRANCHES[branch]['branch_name'] = branch.title()
BRANCHES[branch]['build_branch'] = branch.title()
BRANCHES[branch]['enable_unittests'] = True
BRANCHES[branch]['fetch_symbols'] = True
BRANCHES[branch]['fetch_release_symbols'] = False
BRANCHES[branch]['pgo_strategy'] = None
BRANCHES[branch]['pgo_platforms'] = []
# The following are exceptions to the defaults
######## comm-central
BRANCHES['comm-central']['branch_name'] = "Thunderbird"
BRANCHES['comm-central']['repo_path'] = "comm-central"
#BRANCHES['comm-central']['build_branch'] = "1.9.2"
BRANCHES['comm-central']['pgo_strategy'] = None
######## comm-release
BRANCHES['comm-release']['pgo_strategy'] = None
BRANCHES['comm-release']['repo_path'] = "releases/comm-release"
######## comm-beta
BRANCHES['comm-beta']['pgo_strategy'] = None
BRANCHES['comm-beta']['repo_path'] = "releases/comm-beta"
######## comm-aurora
BRANCHES['comm-aurora']['pgo_strategy'] = None
BRANCHES['comm-aurora']['repo_path'] = "releases/comm-aurora"
######## comm-esr17
BRANCHES['comm-esr17']['pgo_strategy'] = None
BRANCHES['comm-esr17']['repo_path'] = "releases/comm-esr17"
######## try
BRANCHES['try-comm-central']['enable_try'] = True
if __name__ == "__main__":
import sys
import pprint
args = sys.argv[1:]
if len(args) > 0:
items = dict([(b, BRANCHES[b]) for b in args])
else:
items = dict(BRANCHES.items())
for k, v in sorted(items.iteritems()):
out = pprint.pformat(v)
for l in out.splitlines():
print '%s: %s' % (k, l)
for suite in sorted(SUITES):
out = pprint.pformat(SUITES[suite])
for l in out.splitlines():
print '%s: %s' % (suite, l)