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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/bindings/bindings_tests.py

Issue 2372123002: [Bindings] Do not depend on IDL files to detect target component (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/bindings/scripts/idl_compiler.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2011 Google Inc. All rights reserved. 1 # Copyright (C) 2011 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 1. Redistributions of source code must retain the above copyright 6 # 1. Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # 2. Redistributions in binary form must reproduce the above copyright 8 # 2. Redistributions in binary form must reproduce the above copyright
9 # notice, this list of conditions and the following disclaimer in the 9 # notice, this list of conditions and the following disclaimer in the
10 # documentation and/or other materials provided with the distribution. 10 # documentation and/or other materials provided with the distribution.
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 output_dir = os.path.join(output_directory, component) 290 output_dir = os.path.join(output_directory, component)
291 if not os.path.exists(output_dir): 291 if not os.path.exists(output_dir):
292 os.makedirs(output_dir) 292 os.makedirs(output_dir)
293 293
294 generate_union_type_containers(output_dir, component) 294 generate_union_type_containers(output_dir, component)
295 generate_callback_function_impl(output_dir, component) 295 generate_callback_function_impl(output_dir, component)
296 296
297 idl_compiler = IdlCompilerV8( 297 idl_compiler = IdlCompilerV8(
298 output_dir, 298 output_dir,
299 info_provider=component_info_providers[component], 299 info_provider=component_info_providers[component],
300 only_if_changed=True) 300 only_if_changed=True,
301 target_component=component)
301 if component == 'core': 302 if component == 'core':
302 partial_interface_output_dir = os.path.join(output_directory, 303 partial_interface_output_dir = os.path.join(output_directory,
303 'modules') 304 'modules')
304 if not os.path.exists(partial_interface_output_dir): 305 if not os.path.exists(partial_interface_output_dir):
305 os.makedirs(partial_interface_output_dir) 306 os.makedirs(partial_interface_output_dir)
306 idl_partial_interface_compiler = IdlCompilerV8( 307 idl_partial_interface_compiler = IdlCompilerV8(
307 partial_interface_output_dir, 308 partial_interface_output_dir,
308 info_provider=component_info_providers['modules'], 309 info_provider=component_info_providers['modules'],
309 only_if_changed=True, 310 only_if_changed=True,
310 target_component='modules') 311 target_component='modules')
311 else: 312 else:
312 idl_partial_interface_compiler = None 313 idl_partial_interface_compiler = None
313 314
314 dictionary_impl_compiler = IdlCompilerDictionaryImpl( 315 dictionary_impl_compiler = IdlCompilerDictionaryImpl(
315 output_dir, info_provider=component_info_providers[component], 316 output_dir, info_provider=component_info_providers[component],
316 only_if_changed=True) 317 only_if_changed=True, target_component=component)
317 318
318 idl_filenames = [] 319 idl_filenames = []
319 input_directory = os.path.join(test_input_directory, component) 320 input_directory = os.path.join(test_input_directory, component)
320 for filename in os.listdir(input_directory): 321 for filename in os.listdir(input_directory):
321 if (filename.endswith('.idl') and 322 if (filename.endswith('.idl') and
322 # Dependencies aren't built 323 # Dependencies aren't built
323 # (they are used by the dependent) 324 # (they are used by the dependent)
324 filename not in DEPENDENCY_IDL_FILES): 325 filename not in DEPENDENCY_IDL_FILES):
325 idl_filenames.append( 326 idl_filenames.append(
326 os.path.realpath( 327 os.path.realpath(
(...skipping 29 matching lines...) Expand all
356 357
357 358
358 def run_bindings_tests(reset_results, verbose): 359 def run_bindings_tests(reset_results, verbose):
359 # Generate output into the reference directory if resetting results, or 360 # Generate output into the reference directory if resetting results, or
360 # a temp directory if not. 361 # a temp directory if not.
361 if reset_results: 362 if reset_results:
362 print 'Resetting results' 363 print 'Resetting results'
363 return bindings_tests(reference_directory, verbose) 364 return bindings_tests(reference_directory, verbose)
364 with TemporaryDirectory() as temp_dir: 365 with TemporaryDirectory() as temp_dir:
365 return bindings_tests(temp_dir, verbose) 366 return bindings_tests(temp_dir, verbose)
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/scripts/idl_compiler.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698