| OLD | NEW | 
|---|
| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 83 provider = ScopedTempFileProvider() | 83 provider = ScopedTempFileProvider() | 
| 84 | 84 | 
| 85 | 85 | 
| 86 class BindingsTests(object): | 86 class BindingsTests(object): | 
| 87     def __init__(self, reset_results, test_python, verbose, executive): | 87     def __init__(self, reset_results, test_python, verbose, executive): | 
| 88         self.reset_results = reset_results | 88         self.reset_results = reset_results | 
| 89         self.test_python = test_python | 89         self.test_python = test_python | 
| 90         self.verbose = verbose | 90         self.verbose = verbose | 
| 91         self.executive = executive | 91         self.executive = executive | 
| 92         _, self.interface_dependencies_filename = provider.newtempfile() | 92         _, self.interface_dependencies_filename = provider.newtempfile() | 
|  | 93         _, self.interfaces_filename = provider.newtempfile() | 
| 93         _, self.derived_sources_list_filename = provider.newtempfile() | 94         _, self.derived_sources_list_filename = provider.newtempfile() | 
| 94         # Generate output into the reference directory if resetting results, or | 95         # Generate output into the reference directory if resetting results, or | 
| 95         # a temp directory if not. | 96         # a temp directory if not. | 
| 96         if reset_results: | 97         if reset_results: | 
| 97             self.output_directory = reference_directory | 98             self.output_directory = reference_directory | 
| 98         else: | 99         else: | 
| 99             self.output_directory = provider.newtempdir() | 100             self.output_directory = provider.newtempdir() | 
| 100         self.output_directory_py = provider.newtempdir() | 101         self.output_directory_py = provider.newtempdir() | 
| 101         self.event_names_filename = os.path.join(self.output_directory, 'EventIn
     terfaces.in') | 102         self.event_names_filename = os.path.join(self.output_directory, 'EventIn
     terfaces.in') | 
| 102 | 103 | 
| (...skipping 22 matching lines...) Expand all  Loading... | 
| 125             print e.output | 126             print e.output | 
| 126             return e.exit_code | 127             return e.exit_code | 
| 127         return 0 | 128         return 0 | 
| 128 | 129 | 
| 129     def generate_from_idl_py(self, idl_file): | 130     def generate_from_idl_py(self, idl_file): | 
| 130         cmd = ['python', | 131         cmd = ['python', | 
| 131                'bindings/scripts/unstable/idl_compiler.py', | 132                'bindings/scripts/unstable/idl_compiler.py', | 
| 132                '--output-dir', self.output_directory_py, | 133                '--output-dir', self.output_directory_py, | 
| 133                '--idl-attributes-file', 'bindings/IDLExtendedAttributes.txt', | 134                '--idl-attributes-file', 'bindings/IDLExtendedAttributes.txt', | 
| 134                '--include', '.', | 135                '--include', '.', | 
| 135                '--interface-dependencies-file', | 136                '--interfaces-info-file', self.interfaces_filename, | 
| 136                self.interface_dependencies_filename, |  | 
| 137                idl_file] | 137                idl_file] | 
| 138         try: | 138         try: | 
| 139             self.run_command(cmd) | 139             self.run_command(cmd) | 
| 140         except ScriptError, e: | 140         except ScriptError, e: | 
| 141             print 'ERROR: idl_compiler.py: ' + os.path.basename(idl_file) | 141             print 'ERROR: idl_compiler.py: ' + os.path.basename(idl_file) | 
| 142             print e.output | 142             print e.output | 
| 143             return e.exit_code | 143             return e.exit_code | 
| 144         return 0 | 144         return 0 | 
| 145 | 145 | 
| 146     def generate_interface_dependencies(self): | 146     def generate_interface_dependencies(self): | 
| (...skipping 16 matching lines...) Expand all  Loading... | 
| 163         _, window_constructors_file = provider.newtempfile() | 163         _, window_constructors_file = provider.newtempfile() | 
| 164         _, workerglobalscope_constructors_file = provider.newtempfile() | 164         _, workerglobalscope_constructors_file = provider.newtempfile() | 
| 165         _, sharedworkerglobalscope_constructors_file = provider.newtempfile() | 165         _, sharedworkerglobalscope_constructors_file = provider.newtempfile() | 
| 166         _, dedicatedworkerglobalscope_constructors_file = provider.newtempfile() | 166         _, dedicatedworkerglobalscope_constructors_file = provider.newtempfile() | 
| 167         _, serviceworkersglobalscope_constructors_file = provider.newtempfile() | 167         _, serviceworkersglobalscope_constructors_file = provider.newtempfile() | 
| 168         cmd = ['python', | 168         cmd = ['python', | 
| 169                'bindings/scripts/compute_dependencies.py', | 169                'bindings/scripts/compute_dependencies.py', | 
| 170                '--main-idl-files-list', main_idl_files_list_filename, | 170                '--main-idl-files-list', main_idl_files_list_filename, | 
| 171                '--support-idl-files-list', support_idl_files_list_filename, | 171                '--support-idl-files-list', support_idl_files_list_filename, | 
| 172                '--interface-dependencies-file', self.interface_dependencies_file
     name, | 172                '--interface-dependencies-file', self.interface_dependencies_file
     name, | 
|  | 173                '--interfaces-info-file', self.interfaces_filename, | 
| 173                '--bindings-derived-sources-file', self.derived_sources_list_file
     name, | 174                '--bindings-derived-sources-file', self.derived_sources_list_file
     name, | 
| 174                '--window-constructors-file', window_constructors_file, | 175                '--window-constructors-file', window_constructors_file, | 
| 175                '--workerglobalscope-constructors-file', workerglobalscope_constr
     uctors_file, | 176                '--workerglobalscope-constructors-file', workerglobalscope_constr
     uctors_file, | 
| 176                '--sharedworkerglobalscope-constructors-file', sharedworkerglobal
     scope_constructors_file, | 177                '--sharedworkerglobalscope-constructors-file', sharedworkerglobal
     scope_constructors_file, | 
| 177                '--dedicatedworkerglobalscope-constructors-file', dedicatedworker
     globalscope_constructors_file, | 178                '--dedicatedworkerglobalscope-constructors-file', dedicatedworker
     globalscope_constructors_file, | 
| 178                '--serviceworkerglobalscope-constructors-file', serviceworkersglo
     balscope_constructors_file, | 179                '--serviceworkerglobalscope-constructors-file', serviceworkersglo
     balscope_constructors_file, | 
| 179                '--event-names-file', self.event_names_filename, | 180                '--event-names-file', self.event_names_filename, | 
| 180                '--write-file-only-if-changed', '0'] | 181                '--write-file-only-if-changed', '0'] | 
| 181 | 182 | 
| 182         if self.reset_results and self.verbose: | 183         if self.reset_results and self.verbose: | 
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 272 | 273 | 
| 273         all_tests_passed = self.run_tests() | 274         all_tests_passed = self.run_tests() | 
| 274         if all_tests_passed: | 275         if all_tests_passed: | 
| 275             if self.verbose: | 276             if self.verbose: | 
| 276                 print | 277                 print | 
| 277                 print PASS_MESSAGE | 278                 print PASS_MESSAGE | 
| 278             return 0 | 279             return 0 | 
| 279         print | 280         print | 
| 280         print FAIL_MESSAGE | 281         print FAIL_MESSAGE | 
| 281         return -1 | 282         return -1 | 
| OLD | NEW | 
|---|