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

Side by Side Diff: tests/masters_recipes_test.py

Issue 2097223002: Remove traces of removed Mac/Win GN builders. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 5 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import argparse 6 import argparse
7 import json 7 import json
8 import os 8 import os
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 'ios-simulator-gn', 60 'ios-simulator-gn',
61 'Mac10.11 Tests', 61 'Mac10.11 Tests',
62 ], 62 ],
63 'master.chromium.memory': [ 63 'master.chromium.memory': [
64 'Linux ASan Tests (sandboxed)', 64 'Linux ASan Tests (sandboxed)',
65 ], 65 ],
66 'master.chromium.win': [ 66 'master.chromium.win': [
67 'Win7 (32) Tests', 67 'Win7 (32) Tests',
68 'Win x64 Builder (dbg)', 68 'Win x64 Builder (dbg)',
69 ], 69 ],
70
71 }
72
73
74 # This dict should normally be empty, but may be non-empty when builders
75 # are being renamed, so that recipes can continue to refer to builders
76 # that are in the process of being removed.
77 DEPRECATED_BUILDERS = {
Dirk Pranke 2016/06/25 05:10:46 I had originally planned to leave this logic in, b
78 # TODO(dpranke): Remove these after the masters have restarted.
79 'master.chromium.mac': [
80 'Mac GN',
81 'Mac GN (dbg)',
82 ],
83 'master.chromium.win': [
84 'Win8 Aura',
85 'Win8 GN (dbg)',
86 ],
87 'master.tryserver.chromium.mac': [
88 'mac_chromium_gn_dbg',
89 'mac_chromium_gn_rel',
90 ],
91 'master.tryserver.chromium.win': [
92 'win8_chromium_gn_dbg',
93 'win8_chromium_ng',
94 ],
95 } 70 }
96 71
97 72
98 def getBuilders(recipe_name, deps_path): 73 def getBuilders(recipe_name, deps_path):
99 """Asks the given recipe to dump its BUILDERS dictionary. 74 """Asks the given recipe to dump its BUILDERS dictionary.
100 75
101 This must be implemented by the recipe in question. 76 This must be implemented by the recipe in question.
102 77
103 deps_path is where the recipe engine should download the dependent recipe 78 deps_path is where the recipe engine should download the dependent recipe
104 packages. This is to avoid git.lock collision. 79 packages. This is to avoid git.lock collision.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 chromium_trybot_BUILDERS = getBuilders( 135 chromium_trybot_BUILDERS = getBuilders(
161 'chromium_trybot', os.path.join( 136 'chromium_trybot', os.path.join(
162 current_dir, '.chromium_trybot_recipe_deps')) 137 current_dir, '.chromium_trybot_recipe_deps'))
163 chromium_BUILDERS = getBuilders( 138 chromium_BUILDERS = getBuilders(
164 'chromium', os.path.join( 139 'chromium', os.path.join(
165 current_dir, '.chromium_recipe_deps')) 140 current_dir, '.chromium_recipe_deps'))
166 141
167 cq_builders = getCQBuilders(args.cq_config) if args.cq_config else None 142 cq_builders = getCQBuilders(args.cq_config) if args.cq_config else None
168 143
169 for master in MAIN_WATERFALL_MASTERS: 144 for master in MAIN_WATERFALL_MASTERS:
170
171 builders = getBuildersAndRecipes(master) 145 builders = getBuildersAndRecipes(master)
172 all_builders.update((master, b) for b in builders) 146 all_builders.update((master, b) for b in builders)
173 deprecated_builders = set(DEPRECATED_BUILDERS.get(master, []))
174 147
175 # We only have a standardized way to mirror builders using the chromium 148 # We only have a standardized way to mirror builders using the chromium
176 # recipe on the tryserver. 149 # recipe on the tryserver.
177 chromium_recipe_builders[master] = [b for b in builders 150 chromium_recipe_builders[master] = [b for b in builders
178 if builders[b] == 'chromium'] 151 if builders[b] == 'chromium']
179 152
180 recipe_side_builders = chromium_BUILDERS.get( 153 recipe_side_builders = chromium_BUILDERS.get(
181 master.replace('master.', ''), {}).get('builders') 154 master.replace('master.', ''), {}).get('builders')
182 if recipe_side_builders is not None: 155 if recipe_side_builders is not None:
183 bogus_builders = set(recipe_side_builders.keys()).difference( 156 bogus_builders = set(recipe_side_builders.keys()).difference(
184 set(builders.keys())).difference(deprecated_builders) 157 set(builders.keys()))
185 if bogus_builders: 158 if bogus_builders:
186 import pdb; pdb.set_trace()
187 exit_code = 1 159 exit_code = 1
188 print 'The following builders from chromium recipe' 160 print 'The following builders from chromium recipe'
189 print 'do not exist in master config for %s:' % master 161 print 'do not exist in master config for %s:' % master
190 print '\n'.join('\t%s' % b for b in sorted(bogus_builders)) 162 print '\n'.join('\t%s' % b for b in sorted(bogus_builders))
191 163
192 other_recipe_builders = set(recipe_side_builders.keys()).difference( 164 other_recipe_builders = set(recipe_side_builders.keys()).difference(
193 set(chromium_recipe_builders[master])).difference( 165 set(chromium_recipe_builders[master]))
194 deprecated_builders)
195 if other_recipe_builders: 166 if other_recipe_builders:
196 exit_code = 1 167 exit_code = 1
197 print 'The following builders from chromium recipe' 168 print 'The following builders from chromium recipe'
198 print 'are configured to run a different recipe on the master' 169 print 'are configured to run a different recipe on the master'
199 print '(%s):' % master 170 print '(%s):' % master
200 print '\n'.join('\t%s' % b for b in sorted(other_recipe_builders)) 171 print '\n'.join('\t%s' % b for b in sorted(other_recipe_builders))
201 172
202 173
203 for master in TRYSERVER_MASTERS: 174 for master in TRYSERVER_MASTERS:
204 short_master = master.replace('master.', '') 175 short_master = master.replace('master.', '')
205 builders = getBuildersAndRecipes(master) 176 builders = getBuildersAndRecipes(master)
206 recipe_side_builders = chromium_trybot_BUILDERS[ 177 recipe_side_builders = chromium_trybot_BUILDERS[
207 short_master]['builders'] 178 short_master]['builders']
208 deprecated_builders = set(DEPRECATED_BUILDERS.get(master, []))
209 179
210 bogus_builders = set(recipe_side_builders.keys()).difference( 180 bogus_builders = set(recipe_side_builders.keys()).difference(
211 set(builders.keys())).difference(deprecated_builders) 181 set(builders.keys()))
212 if bogus_builders: 182 if bogus_builders:
213 exit_code = 1 183 exit_code = 1
214 print 'The following builders from chromium_trybot recipe' 184 print 'The following builders from chromium_trybot recipe'
215 print 'do not exist in master config for %s:' % master 185 print 'do not exist in master config for %s:' % master
216 print '\n'.join('\t%s' % b for b in sorted(bogus_builders)) 186 print '\n'.join('\t%s' % b for b in sorted(bogus_builders))
217 187
218 for builder, recipe in builders.iteritems(): 188 for builder, recipe in builders.iteritems():
219 # Only the chromium_trybot recipe knows how to mirror a main waterfall 189 # Only the chromium_trybot recipe knows how to mirror a main waterfall
220 # builder. 190 # builder.
221 if recipe != 'chromium_trybot': 191 if recipe != 'chromium_trybot':
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 exit_code = 1 231 exit_code = 1
262 print 'Unused suppressions:' 232 print 'Unused suppressions:'
263 print '\n'.join(sorted( 233 print '\n'.join(sorted(
264 '\t%s:%s' % (b[0], b[1]) for b in unused_suppressions)) 234 '\t%s:%s' % (b[0], b[1]) for b in unused_suppressions))
265 235
266 return exit_code 236 return exit_code
267 237
268 238
269 if __name__ == '__main__': 239 if __name__ == '__main__':
270 sys.exit(main(sys.argv[1:])) 240 sys.exit(main(sys.argv[1:]))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698