| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 'android_webview_unittests', | 136 'android_webview_unittests', |
| 137 'angle_deqp_gles2_tests', | 137 'angle_deqp_gles2_tests', |
| 138 'angle_deqp_gles3_tests', | 138 'angle_deqp_gles3_tests', |
| 139 'cast_media_unittests', | 139 'cast_media_unittests', |
| 140 'cast_shell_browser_test', | 140 'cast_shell_browser_test', |
| 141 'chromevox_tests', | 141 'chromevox_tests', |
| 142 'nacl_helper_nonsfi_unittests', | 142 'nacl_helper_nonsfi_unittests', |
| 143 | 143 |
| 144 # TODO(kbr): teach this script about isolated_scripts tests. | 144 # TODO(kbr): teach this script about isolated_scripts tests. |
| 145 # crbug.com/620531 | 145 # crbug.com/620531 |
| 146 'mash_browser_tests', |
| 146 'telemetry_gpu_integration_test', | 147 'telemetry_gpu_integration_test', |
| 147 'telemetry_gpu_test', | 148 'telemetry_gpu_test', |
| 148 'telemetry_gpu_unittests', | 149 'telemetry_gpu_unittests', |
| 149 'telemetry_perf_unittests', | 150 'telemetry_perf_unittests', |
| 150 'telemetry_unittests', | 151 'telemetry_unittests', |
| 151 } | 152 } |
| 152 | 153 |
| 153 | 154 |
| 154 class Error(Exception): | 155 class Error(Exception): |
| 155 """Processing error.""" | 156 """Processing error.""" |
| (...skipping 75 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.' % | 232 raise Error('%s: %s / %s is not listed in gn_isolate_map.pyl.' % |
| 232 (filename, builder, d['test'])) | 233 (filename, builder, d['test'])) |
| 233 elif d['test'] in ninja_targets: | 234 elif d['test'] in ninja_targets: |
| 234 ninja_targets_seen.add(d['test']) | 235 ninja_targets_seen.add(d['test']) |
| 235 | 236 |
| 236 name = d.get('name', d['test']) | 237 name = d.get('name', d['test']) |
| 237 if name in seen: | 238 if name in seen: |
| 238 raise Error('%s: %s / %s is listed multiple times.' % | 239 raise Error('%s: %s / %s is listed multiple times.' % |
| 239 (filename, builder, name)) | 240 (filename, builder, name)) |
| 240 seen.add(name) | 241 seen.add(name) |
| 242 d.setdefault('swarming', {}).setdefault( |
| 243 'can_use_on_swarming_builders', True) |
| 241 | 244 |
| 242 config[builder]['gtest_tests'] = sorted( | 245 config[builder]['gtest_tests'] = sorted( |
| 243 data['gtest_tests'], key=lambda x: x['test']) | 246 data['gtest_tests'], key=lambda x: x['test']) |
| 244 | 247 |
| 245 # The trick here is that process_builder_remaining() is called before | 248 # 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 | 249 # process_builder_convert() so tests_location can be used to know how many |
| 247 # tests were converted. | 250 # tests were converted. |
| 248 if mode in ('convert', 'remaining'): | 251 if mode in ('convert', 'remaining'): |
| 249 process_builder_remaining(data, filename, builder, tests_location) | 252 process_builder_remaining(data, filename, builder, tests_location) |
| 250 if mode == 'convert': | 253 if mode == 'convert': |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 elif args.mode == 'remaining': | 394 elif args.mode == 'remaining': |
| 392 print_remaining(args.test_name, tests_location) | 395 print_remaining(args.test_name, tests_location) |
| 393 return result | 396 return result |
| 394 except Error as e: | 397 except Error as e: |
| 395 sys.stderr.write('%s\n' % e) | 398 sys.stderr.write('%s\n' % e) |
| 396 return 1 | 399 return 1 |
| 397 | 400 |
| 398 | 401 |
| 399 if __name__ == "__main__": | 402 if __name__ == "__main__": |
| 400 sys.exit(main()) | 403 sys.exit(main()) |
| OLD | NEW |