Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 = { | |
| 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 ], | |
| 70 } | 95 } |
| 71 | 96 |
| 72 | 97 |
| 73 def getBuilders(recipe_name, deps_path): | 98 def getBuilders(recipe_name, deps_path): |
| 74 """Asks the given recipe to dump its BUILDERS dictionary. | 99 """Asks the given recipe to dump its BUILDERS dictionary. |
| 75 | 100 |
| 76 This must be implemented by the recipe in question. | 101 This must be implemented by the recipe in question. |
| 77 | 102 |
| 78 deps_path is where the recipe engine should download the dependent recipe | 103 deps_path is where the recipe engine should download the dependent recipe |
| 79 packages. This is to avoid git.lock collision. | 104 packages. This is to avoid git.lock collision. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 135 chromium_trybot_BUILDERS = getBuilders( | 160 chromium_trybot_BUILDERS = getBuilders( |
| 136 'chromium_trybot', os.path.join( | 161 'chromium_trybot', os.path.join( |
| 137 current_dir, '.chromium_trybot_recipe_deps')) | 162 current_dir, '.chromium_trybot_recipe_deps')) |
| 138 chromium_BUILDERS = getBuilders( | 163 chromium_BUILDERS = getBuilders( |
| 139 'chromium', os.path.join( | 164 'chromium', os.path.join( |
| 140 current_dir, '.chromium_recipe_deps')) | 165 current_dir, '.chromium_recipe_deps')) |
| 141 | 166 |
| 142 cq_builders = getCQBuilders(args.cq_config) if args.cq_config else None | 167 cq_builders = getCQBuilders(args.cq_config) if args.cq_config else None |
| 143 | 168 |
| 144 for master in MAIN_WATERFALL_MASTERS: | 169 for master in MAIN_WATERFALL_MASTERS: |
| 170 | |
| 145 builders = getBuildersAndRecipes(master) | 171 builders = getBuildersAndRecipes(master) |
| 146 all_builders.update((master, b) for b in builders) | 172 all_builders.update((master, b) for b in builders) |
| 173 deprecated_builders = set(DEPRECATED_BUILDERS.get(master, [])) | |
| 147 | 174 |
| 148 # We only have a standardized way to mirror builders using the chromium | 175 # We only have a standardized way to mirror builders using the chromium |
| 149 # recipe on the tryserver. | 176 # recipe on the tryserver. |
| 150 chromium_recipe_builders[master] = [b for b in builders | 177 chromium_recipe_builders[master] = [b for b in builders |
| 151 if builders[b] == 'chromium'] | 178 if builders[b] == 'chromium'] |
| 152 | 179 |
| 153 recipe_side_builders = chromium_BUILDERS.get( | 180 recipe_side_builders = chromium_BUILDERS.get( |
| 154 master.replace('master.', ''), {}).get('builders') | 181 master.replace('master.', ''), {}).get('builders') |
| 155 if recipe_side_builders is not None: | 182 if recipe_side_builders is not None: |
| 156 bogus_builders = set(recipe_side_builders.keys()).difference( | 183 bogus_builders = set(recipe_side_builders.keys()).difference( |
| 157 set(builders.keys())) | 184 set(builders.keys())).difference(deprecated_builders) |
| 158 if bogus_builders: | 185 if bogus_builders: |
| 186 import pdb; pdb.set_trace() | |
|
martiniss
2016/06/25 04:39:49
Left in some debug code.
Dirk Pranke
2016/06/25 04:45:37
Ah, so I did. Good thing it doesn't fire :).
I'll
| |
| 159 exit_code = 1 | 187 exit_code = 1 |
| 160 print 'The following builders from chromium recipe' | 188 print 'The following builders from chromium recipe' |
| 161 print 'do not exist in master config for %s:' % master | 189 print 'do not exist in master config for %s:' % master |
| 162 print '\n'.join('\t%s' % b for b in sorted(bogus_builders)) | 190 print '\n'.join('\t%s' % b for b in sorted(bogus_builders)) |
| 163 | 191 |
| 164 other_recipe_builders = set(recipe_side_builders.keys()).difference( | 192 other_recipe_builders = set(recipe_side_builders.keys()).difference( |
| 165 set(chromium_recipe_builders[master])) | 193 set(chromium_recipe_builders[master])).difference( |
| 194 deprecated_builders) | |
| 166 if other_recipe_builders: | 195 if other_recipe_builders: |
| 167 exit_code = 1 | 196 exit_code = 1 |
| 168 print 'The following builders from chromium recipe' | 197 print 'The following builders from chromium recipe' |
| 169 print 'are configured to run a different recipe on the master' | 198 print 'are configured to run a different recipe on the master' |
| 170 print '(%s):' % master | 199 print '(%s):' % master |
| 171 print '\n'.join('\t%s' % b for b in sorted(other_recipe_builders)) | 200 print '\n'.join('\t%s' % b for b in sorted(other_recipe_builders)) |
| 172 | 201 |
| 173 | 202 |
| 174 for master in TRYSERVER_MASTERS: | 203 for master in TRYSERVER_MASTERS: |
| 175 short_master = master.replace('master.', '') | 204 short_master = master.replace('master.', '') |
| 176 builders = getBuildersAndRecipes(master) | 205 builders = getBuildersAndRecipes(master) |
| 177 recipe_side_builders = chromium_trybot_BUILDERS[ | 206 recipe_side_builders = chromium_trybot_BUILDERS[ |
| 178 short_master]['builders'] | 207 short_master]['builders'] |
| 208 deprecated_builders = set(DEPRECATED_BUILDERS.get(master, [])) | |
| 179 | 209 |
| 180 bogus_builders = set(recipe_side_builders.keys()).difference( | 210 bogus_builders = set(recipe_side_builders.keys()).difference( |
| 181 set(builders.keys())) | 211 set(builders.keys())).difference(deprecated_builders) |
| 182 if bogus_builders: | 212 if bogus_builders: |
| 183 exit_code = 1 | 213 exit_code = 1 |
| 184 print 'The following builders from chromium_trybot recipe' | 214 print 'The following builders from chromium_trybot recipe' |
| 185 print 'do not exist in master config for %s:' % master | 215 print 'do not exist in master config for %s:' % master |
| 186 print '\n'.join('\t%s' % b for b in sorted(bogus_builders)) | 216 print '\n'.join('\t%s' % b for b in sorted(bogus_builders)) |
| 187 | 217 |
| 188 for builder, recipe in builders.iteritems(): | 218 for builder, recipe in builders.iteritems(): |
| 189 # Only the chromium_trybot recipe knows how to mirror a main waterfall | 219 # Only the chromium_trybot recipe knows how to mirror a main waterfall |
| 190 # builder. | 220 # builder. |
| 191 if recipe != 'chromium_trybot': | 221 if recipe != 'chromium_trybot': |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 231 exit_code = 1 | 261 exit_code = 1 |
| 232 print 'Unused suppressions:' | 262 print 'Unused suppressions:' |
| 233 print '\n'.join(sorted( | 263 print '\n'.join(sorted( |
| 234 '\t%s:%s' % (b[0], b[1]) for b in unused_suppressions)) | 264 '\t%s:%s' % (b[0], b[1]) for b in unused_suppressions)) |
| 235 | 265 |
| 236 return exit_code | 266 return exit_code |
| 237 | 267 |
| 238 | 268 |
| 239 if __name__ == '__main__': | 269 if __name__ == '__main__': |
| 240 sys.exit(main(sys.argv[1:])) | 270 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |