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

Unified Diff: Tools/Scripts/webkitpy/bindings/main.py

Issue 24053003: Support partial interface for test support idls (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove hardcoding Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Tools/Scripts/webkitpy/bindings/main.py
diff --git a/Tools/Scripts/webkitpy/bindings/main.py b/Tools/Scripts/webkitpy/bindings/main.py
index 80d8dc6a23a449c23061cb8e48ef9792dec2cdcd..4fd17efde4ef389c219e46701a2cfcecc313b8cd 100644
--- a/Tools/Scripts/webkitpy/bindings/main.py
+++ b/Tools/Scripts/webkitpy/bindings/main.py
@@ -53,6 +53,7 @@ SKIP_PYTHON = set([
])
input_directory = os.path.join('bindings', 'tests', 'idls')
+testing_input_directory = os.path.join('bindings', 'tests', 'idls', 'testing')
reference_directory = os.path.join('bindings', 'tests', 'results')
reference_event_names_filename = os.path.join(reference_directory, 'EventInterfaces.in')
@@ -86,6 +87,7 @@ class BindingsTests(object):
self.reset_results = reset_results
self.executive = executive
_, self.interface_dependencies_filename = provider.newtempfile()
+ _, self.binding_derived_sources_filename = provider.newtempfile()
if reset_results:
self.event_names_filename = os.path.join(reference_directory, 'EventInterfaces.in')
else:
@@ -142,6 +144,14 @@ class BindingsTests(object):
for idl_path in idl_paths)
os.write(idl_files_list_file, idl_files_list_contents)
+ testing_idl_files_list_file, testing_idl_files_list_filename = provider.newtempfile()
+ testing_idl_paths = [os.path.join(testing_input_directory, input_file)
+ for input_file in os.listdir(testing_input_directory)
+ if input_file.endswith('.idl')]
+ idl_files_list_contents = ''.join(idl_path + '\n'
+ for idl_path in testing_idl_paths)
+ os.write(testing_idl_files_list_file, idl_files_list_contents)
+
# Dummy files, required by compute_dependencies but not checked
_, window_constructors_file = provider.newtempfile()
_, workerglobalscope_constructors_file = provider.newtempfile()
@@ -150,7 +160,9 @@ class BindingsTests(object):
cmd = ['python',
'bindings/scripts/compute_dependencies.py',
'--idl-files-list', idl_files_list_filename,
+ '--testing-idl-files-list', testing_idl_files_list_filename,
'--interface-dependencies-file', self.interface_dependencies_filename,
+ '--binding-derived-source-file', self.binding_derived_sources_filename,
'--window-constructors-file', window_constructors_file,
'--workerglobalscope-constructors-file', workerglobalscope_constructors_file,
'--sharedworkerglobalscope-constructors-file', sharedworkerglobalscope_constructors_file,
@@ -199,7 +211,7 @@ class BindingsTests(object):
for (reference_filename, work_filename) in file_pairs])
def run_tests(self):
- def generate_and_check_output_pl(idl_filename):
+ def generate_and_check_output_pl(idl_filename, input_directory):
# Generate output into the reference directory if resetting
# results, or a temp directory if not.
if self.reset_results:
@@ -230,9 +242,12 @@ class BindingsTests(object):
else:
passed = self.identical_file(reference_event_names_filename,
self.event_names_filename)
- passed &= all([generate_and_check_output_pl(input_file)
+ passed &= all([generate_and_check_output_pl(input_file, input_directory)
Nils Barth (inactive) 2013/09/17 02:23:35 Could you make this a quick loop? for directory in
kihong 2013/10/04 06:11:38 Done.
for input_file in os.listdir(input_directory)
if input_file.endswith('.idl')])
+ passed &= all([generate_and_check_output_pl(input_file, testing_input_directory)
+ for input_file in os.listdir(testing_input_directory)
+ if input_file.endswith('.idl')])
print
print 'Python:'
passed &= all([generate_and_check_output_py(input_file)

Powered by Google App Engine
This is Rietveld 408576698