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

Side by Side Diff: Tools/Scripts/webkitpy/bindings/main.py

Issue 173803006: Split generate_global_constructors.py out of compute_dependencies.py (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Cleaner Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/scripts/utilities.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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 def write_list_file(idl_paths): 158 def write_list_file(idl_paths):
159 list_file, list_filename = provider.newtempfile() 159 list_file, list_filename = provider.newtempfile()
160 list_contents = ''.join(idl_path + '\n' 160 list_contents = ''.join(idl_path + '\n'
161 for idl_path in idl_paths) 161 for idl_path in idl_paths)
162 os.write(list_file, list_contents) 162 os.write(list_file, list_contents)
163 return list_filename 163 return list_filename
164 164
165 def compute_dependencies(idl_files_list_filename, 165 def compute_dependencies(idl_files_list_filename,
166 event_names_filename): 166 event_names_filename):
167 # Dummy files, required by compute_dependencies but not checked
168 _, window_constructors_file = provider.newtempfile()
169 _, workerglobalscope_constructors_file = provider.newtempfile()
170 _, sharedworkerglobalscope_constructors_file = provider.newtempfile( )
171 _, dedicatedworkerglobalscope_constructors_file = provider.newtempfi le()
172 _, serviceworkersglobalscope_constructors_file = provider.newtempfil e()
173 cmd = ['python', 167 cmd = ['python',
174 'bindings/scripts/compute_dependencies.py', 168 'bindings/scripts/compute_interfaces_info.py',
175 '--idl-files-list', idl_files_list_filename, 169 '--idl-files-list', idl_files_list_filename,
176 '--interface-dependencies-file', self.interface_dependencies_ filename, 170 '--interface-dependencies-file', self.interface_dependencies_ filename,
177 '--interfaces-info-file', self.interfaces_info_filename, 171 '--interfaces-info-file', self.interfaces_info_filename,
178 '--window-constructors-file', window_constructors_file,
179 '--workerglobalscope-constructors-file', workerglobalscope_co nstructors_file,
180 '--sharedworkerglobalscope-constructors-file', sharedworkergl obalscope_constructors_file,
181 '--dedicatedworkerglobalscope-constructors-file', dedicatedwo rkerglobalscope_constructors_file,
182 '--serviceworkerglobalscope-constructors-file', serviceworker sglobalscope_constructors_file,
183 '--event-names-file', event_names_filename, 172 '--event-names-file', event_names_filename,
184 '--write-file-only-if-changed', '0'] 173 '--write-file-only-if-changed', '0']
185 self.run_command(cmd) 174 self.run_command(cmd)
186 175
187 test_idl_files_list_filename = write_list_file(idl_paths(test_input_dire ctory)) 176 test_idl_files_list_filename = write_list_file(idl_paths(test_input_dire ctory))
188 all_idl_files_list_filename = write_list_file(idl_paths_recursive(all_in put_directory)) 177 all_idl_files_list_filename = write_list_file(idl_paths_recursive(all_in put_directory))
189 178
190 if self.reset_results and self.verbose: 179 if self.reset_results and self.verbose:
191 print 'Reset results: EventInterfaces.in' 180 print 'Reset results: EventInterfaces.in'
192 try: 181 try:
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 292
304 all_tests_passed = self.run_tests() 293 all_tests_passed = self.run_tests()
305 if all_tests_passed: 294 if all_tests_passed:
306 if self.verbose: 295 if self.verbose:
307 print 296 print
308 print PASS_MESSAGE 297 print PASS_MESSAGE
309 return 0 298 return 0
310 print 299 print
311 print FAIL_MESSAGE 300 print FAIL_MESSAGE
312 return -1 301 return -1
OLDNEW
« no previous file with comments | « Source/bindings/scripts/utilities.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698