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

Side by Side Diff: tests/masters_recipes_test.py

Issue 1554383003: Add support for "additional_mirrors" property in trybot configs. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 11 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 ], 80 ],
81 'master.chromium.memory': [ 81 'master.chromium.memory': [
82 'Linux ASan Tests (sandboxed)', 82 'Linux ASan Tests (sandboxed)',
83 ], 83 ],
84 'master.chromium.win': [ 84 'master.chromium.win': [
85 'Win x64 Builder (dbg)', 85 'Win x64 Builder (dbg)',
86 ], 86 ],
87 } 87 }
88 88
89 89
90 # TODO(kbr): remove these suppressions. They're only needed
91 # temporarily during the transition of the chromium.gpu bots to the
92 # Chromium recipe, in order to achieve full code coverage while the
93 # bots are actually running a different recipe.
94 WRONG_RECIPE_SUPPRESSIONS = [
95 'GPU Linux Builder',
96 'Linux Release (NVIDIA)',
97 ]
98
90 def getBuilders(recipe_name): 99 def getBuilders(recipe_name):
91 """Asks the given recipe to dump its BUILDERS dictionary. 100 """Asks the given recipe to dump its BUILDERS dictionary.
92 101
93 This must be implemented by the recipe in question. 102 This must be implemented by the recipe in question.
94 """ 103 """
95 (fh, builders_file) = tempfile.mkstemp('.json') 104 (fh, builders_file) = tempfile.mkstemp('.json')
96 os.close(fh) 105 os.close(fh)
97 try: 106 try:
98 subprocess.check_call([ 107 subprocess.check_call([
99 os.path.join(BASE_DIR, 'scripts', 'slave', 'recipes.py'), 108 os.path.join(BASE_DIR, 'scripts', 'slave', 'recipes.py'),
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 if recipe_side_builders is not None: 172 if recipe_side_builders is not None:
164 bogus_builders = set(recipe_side_builders.keys()).difference( 173 bogus_builders = set(recipe_side_builders.keys()).difference(
165 set(builders.keys())) 174 set(builders.keys()))
166 if bogus_builders: 175 if bogus_builders:
167 exit_code = 1 176 exit_code = 1
168 print 'The following builders from chromium recipe' 177 print 'The following builders from chromium recipe'
169 print 'do not exist in master config for %s:' % master 178 print 'do not exist in master config for %s:' % master
170 print '\n'.join('\t%s' % b for b in sorted(bogus_builders)) 179 print '\n'.join('\t%s' % b for b in sorted(bogus_builders))
171 180
172 other_recipe_builders = set(recipe_side_builders.keys()).difference( 181 other_recipe_builders = set(recipe_side_builders.keys()).difference(
173 set(chromium_recipe_builders[master])) 182 set(chromium_recipe_builders[master])).difference(
183 set(WRONG_RECIPE_SUPPRESSIONS))
Sergey Berezin 2016/01/06 01:50:56 nit: 4 space indent for args
174 if other_recipe_builders: 184 if other_recipe_builders:
175 exit_code = 1 185 exit_code = 1
176 print 'The following builders from chromium recipe' 186 print 'The following builders from chromium recipe'
177 print 'are configured to run a different recipe on the master' 187 print 'are configured to run a different recipe on the master'
178 print '(%s):' % master 188 print '(%s):' % master
179 print '\n'.join('\t%s' % b for b in sorted(other_recipe_builders)) 189 print '\n'.join('\t%s' % b for b in sorted(other_recipe_builders))
180 190
181 191
182 for master in TRYSERVER_MASTERS: 192 for master in TRYSERVER_MASTERS:
183 short_master = master.replace('master.', '') 193 short_master = master.replace('master.', '')
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 exit_code = 1 248 exit_code = 1
239 print 'Unused suppressions:' 249 print 'Unused suppressions:'
240 print '\n'.join(sorted( 250 print '\n'.join(sorted(
241 '\t%s:%s' % (b[0], b[1]) for b in unused_suppressions)) 251 '\t%s:%s' % (b[0], b[1]) for b in unused_suppressions))
242 252
243 return exit_code 253 return exit_code
244 254
245 255
246 if __name__ == '__main__': 256 if __name__ == '__main__':
247 sys.exit(main(sys.argv[1:])) 257 sys.exit(main(sys.argv[1:]))
OLDNEW
« scripts/slave/recipes/chromium_trybot.py ('K') | « scripts/slave/recipes/findit/chromium/test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698