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

Side by Side Diff: testing/buildbot/manage.py

Issue 1206033005: Rework how isolates are generated in MB. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add ui_base_unittests_run Created 5 years, 6 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 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 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 """Toolbox to manage all the json files in this directory. 6 """Toolbox to manage all the json files in this directory.
7 7
8 It can reformat them in their canonical format or ensures they are well 8 It can reformat them in their canonical format or ensures they are well
9 formatted. 9 formatted.
10 """ 10 """
(...skipping 22 matching lines...) Expand all
33 33
34 # These are not supported on Swarming yet. 34 # These are not supported on Swarming yet.
35 # http://crbug.com/472205 35 # http://crbug.com/472205
36 'Chromium Mac 10.10', 36 'Chromium Mac 10.10',
37 # http://crbug.com/441429 37 # http://crbug.com/441429
38 'Linux Trusty (32)', 'Linux Trusty (dbg)(32)', 38 'Linux Trusty (32)', 'Linux Trusty (dbg)(32)',
39 39
40 # http://crbug.com/480053 40 # http://crbug.com/480053
41 'Linux GN', 41 'Linux GN',
42 'Linux GN (dbg)', 42 'Linux GN (dbg)',
43 'linux_chromium_gn_rel', 43 'Mac GN',
44 'Mac GN (dbg)',
45 'Win8 Aura',
46 'Win8 GN (dbg)'
44 47
45 # Unmaintained builders on chromium.fyi 48 # Unmaintained builders on chromium.fyi
46 'ClangToTMac', 49 'ClangToTMac',
47 'ClangToTMacASan', 50 'ClangToTMacASan',
48 51
49 # One off builders. Note that Swarming does support ARM. 52 # One off builders. Note that Swarming does support ARM.
50 'Linux ARM Cross-Compile', 53 'Linux ARM Cross-Compile',
51 'Site Isolation Linux', 54 'Site Isolation Linux',
52 'Site Isolation Win', 55 'Site Isolation Win',
53 } 56 }
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 parser.error('A test name is required with --convert') 260 parser.error('A test name is required with --convert')
258 if args.test_name + '.isolate' not in get_isolates(): 261 if args.test_name + '.isolate' not in get_isolates():
259 parser.error('Create %s.isolate first' % args.test_name) 262 parser.error('Create %s.isolate first' % args.test_name)
260 263
261 # Stats when running in --remaining mode; 264 # Stats when running in --remaining mode;
262 tests_location = collections.defaultdict( 265 tests_location = collections.defaultdict(
263 lambda: { 266 lambda: {
264 'count_run_local': 0, 'count_run_on_swarming': 0, 'local_configs': {} 267 'count_run_local': 0, 'count_run_on_swarming': 0, 'local_configs': {}
265 }) 268 })
266 269
267 with open(os.path.join(THIS_DIR, "ninja_to_gn.pyl")) as fp: 270 with open(os.path.join(THIS_DIR, "gn_isolate_map.pyl")) as fp:
268 ninja_targets = ast.literal_eval(fp.read()) 271 gn_isolate_map = ast.literal_eval(fp.read())
272 ninja_targets = dict((k, v['label']) for k, v in gn_isolate_map.items())
M-A Ruel 2015/06/25 14:49:22 ninja_targets = {k: v['label'] for k, v in gn_isol
269 273
270 try: 274 try:
271 result = 0 275 result = 0
272 ninja_targets_seen = set() 276 ninja_targets_seen = set()
273 for filepath in glob.glob(os.path.join(THIS_DIR, '*.json')): 277 for filepath in glob.glob(os.path.join(THIS_DIR, '*.json')):
274 if not process_file(args.mode, args.test_name, tests_location, filepath, 278 if not process_file(args.mode, args.test_name, tests_location, filepath,
275 ninja_targets, ninja_targets_seen): 279 ninja_targets, ninja_targets_seen):
276 result = 1 280 result = 1
277 281
278 extra_targets = set(ninja_targets) - ninja_targets_seen 282 extra_targets = set(ninja_targets) - ninja_targets_seen
(...skipping 10 matching lines...) Expand all
289 elif args.mode == 'remaining': 293 elif args.mode == 'remaining':
290 print_remaining(args.test_name, tests_location) 294 print_remaining(args.test_name, tests_location)
291 return result 295 return result
292 except Error as e: 296 except Error as e:
293 sys.stderr.write('%s\n' % e) 297 sys.stderr.write('%s\n' % e)
294 return 1 298 return 1
295 299
296 300
297 if __name__ == "__main__": 301 if __name__ == "__main__":
298 sys.exit(main()) 302 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698