| OLD | NEW | 
|---|
| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 231         raise Error('%s: %s / %s is not listed in gn_isolate_map.pyl.' % | 231         raise Error('%s: %s / %s is not listed in gn_isolate_map.pyl.' % | 
| 232                     (filename, builder, d['test'])) | 232                     (filename, builder, d['test'])) | 
| 233       elif d['test'] in ninja_targets: | 233       elif d['test'] in ninja_targets: | 
| 234         ninja_targets_seen.add(d['test']) | 234         ninja_targets_seen.add(d['test']) | 
| 235 | 235 | 
| 236       name = d.get('name', d['test']) | 236       name = d.get('name', d['test']) | 
| 237       if name in seen: | 237       if name in seen: | 
| 238         raise Error('%s: %s / %s is listed multiple times.' % | 238         raise Error('%s: %s / %s is listed multiple times.' % | 
| 239                     (filename, builder, name)) | 239                     (filename, builder, name)) | 
| 240       seen.add(name) | 240       seen.add(name) | 
|  | 241       d.setdefault('swarming', {}).setdefault( | 
|  | 242           'can_use_on_swarming_builders', False) | 
| 241 | 243 | 
| 242     config[builder]['gtest_tests'] = sorted( | 244     config[builder]['gtest_tests'] = sorted( | 
| 243         data['gtest_tests'], key=lambda x: x['test']) | 245         data['gtest_tests'], key=lambda x: x['test']) | 
| 244 | 246 | 
| 245     # The trick here is that process_builder_remaining() is called before | 247     # The trick here is that process_builder_remaining() is called before | 
| 246     # process_builder_convert() so tests_location can be used to know how many | 248     # process_builder_convert() so tests_location can be used to know how many | 
| 247     # tests were converted. | 249     # tests were converted. | 
| 248     if mode in ('convert', 'remaining'): | 250     if mode in ('convert', 'remaining'): | 
| 249       process_builder_remaining(data, filename, builder, tests_location) | 251       process_builder_remaining(data, filename, builder, tests_location) | 
| 250     if mode == 'convert': | 252     if mode == 'convert': | 
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 391     elif args.mode == 'remaining': | 393     elif args.mode == 'remaining': | 
| 392       print_remaining(args.test_name, tests_location) | 394       print_remaining(args.test_name, tests_location) | 
| 393     return result | 395     return result | 
| 394   except Error as e: | 396   except Error as e: | 
| 395     sys.stderr.write('%s\n' % e) | 397     sys.stderr.write('%s\n' % e) | 
| 396     return 1 | 398     return 1 | 
| 397 | 399 | 
| 398 | 400 | 
| 399 if __name__ == "__main__": | 401 if __name__ == "__main__": | 
| 400   sys.exit(main()) | 402   sys.exit(main()) | 
| OLD | NEW | 
|---|