| 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 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 from contextlib import contextmanager | 25 from contextlib import contextmanager |
| 26 import filecmp | 26 import filecmp |
| 27 import fnmatch | 27 import fnmatch |
| 28 import os | 28 import os |
| 29 import shutil | 29 import shutil |
| 30 import tempfile | 30 import tempfile |
| 31 | 31 |
| 32 from webkitpy.common.system.executive import Executive | 32 from webkitpy.common.system.executive import Executive |
| 33 | 33 |
| 34 from webkitpy.common import webkit_finder | 34 from webkitpy.common import path_finder |
| 35 webkit_finder.add_bindings_scripts_dir_to_sys_path() | 35 path_finder.add_bindings_scripts_dir_to_sys_path() |
| 36 | 36 |
| 37 from code_generator_v8 import CodeGeneratorDictionaryImpl | 37 from code_generator_v8 import CodeGeneratorDictionaryImpl |
| 38 from code_generator_v8 import CodeGeneratorV8 | 38 from code_generator_v8 import CodeGeneratorV8 |
| 39 from code_generator_v8 import CodeGeneratorUnionType | 39 from code_generator_v8 import CodeGeneratorUnionType |
| 40 from code_generator_v8 import CodeGeneratorCallbackFunction | 40 from code_generator_v8 import CodeGeneratorCallbackFunction |
| 41 from code_generator_web_agent_api import CodeGeneratorWebAgentAPI | 41 from code_generator_web_agent_api import CodeGeneratorWebAgentAPI |
| 42 from compute_interfaces_info_individual import InterfaceInfoCollector | 42 from compute_interfaces_info_individual import InterfaceInfoCollector |
| 43 from compute_interfaces_info_overall import (compute_interfaces_info_overall, | 43 from compute_interfaces_info_overall import (compute_interfaces_info_overall, |
| 44 interfaces_info) | 44 interfaces_info) |
| 45 from idl_compiler import (generate_bindings, | 45 from idl_compiler import (generate_bindings, |
| (...skipping 24 matching lines...) Expand all Loading... |
| 70 'TestInterfacePartial2.idl', | 70 'TestInterfacePartial2.idl', |
| 71 'TestInterfacePartial3.idl', | 71 'TestInterfacePartial3.idl', |
| 72 'TestInterfacePartial4.idl', | 72 'TestInterfacePartial4.idl', |
| 73 'TestInterfacePartialSecureContext.idl', | 73 'TestInterfacePartialSecureContext.idl', |
| 74 'TestInterface2Partial.idl', | 74 'TestInterface2Partial.idl', |
| 75 'TestInterface2Partial2.idl', | 75 'TestInterface2Partial2.idl', |
| 76 ]) | 76 ]) |
| 77 | 77 |
| 78 COMPONENT_DIRECTORY = frozenset(['core', 'modules']) | 78 COMPONENT_DIRECTORY = frozenset(['core', 'modules']) |
| 79 | 79 |
| 80 SOURCE_PATH = webkit_finder.get_source_dir() | 80 SOURCE_PATH = path_finder.get_source_dir() |
| 81 TEST_INPUT_DIRECTORY = os.path.join(SOURCE_PATH, 'bindings', 'tests', 'idls') | 81 TEST_INPUT_DIRECTORY = os.path.join(SOURCE_PATH, 'bindings', 'tests', 'idls') |
| 82 REFERENCE_DIRECTORY = os.path.join(SOURCE_PATH, 'bindings', 'tests', 'results') | 82 REFERENCE_DIRECTORY = os.path.join(SOURCE_PATH, 'bindings', 'tests', 'results') |
| 83 | 83 |
| 84 # component -> ComponentInfoProvider. | 84 # component -> ComponentInfoProvider. |
| 85 # Note that this dict contains information about testing idl files, which live | 85 # Note that this dict contains information about testing idl files, which live |
| 86 # in Source/bindings/tests/idls/{core,modules}, not in Source/{core,modules}. | 86 # in Source/bindings/tests/idls/{core,modules}, not in Source/{core,modules}. |
| 87 component_info_providers = {} | 87 component_info_providers = {} |
| 88 | 88 |
| 89 | 89 |
| 90 @contextmanager | 90 @contextmanager |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 361 |
| 362 | 362 |
| 363 def run_bindings_tests(reset_results, verbose): | 363 def run_bindings_tests(reset_results, verbose): |
| 364 # Generate output into the reference directory if resetting results, or | 364 # Generate output into the reference directory if resetting results, or |
| 365 # a temp directory if not. | 365 # a temp directory if not. |
| 366 if reset_results: | 366 if reset_results: |
| 367 print 'Resetting results' | 367 print 'Resetting results' |
| 368 return bindings_tests(REFERENCE_DIRECTORY, verbose) | 368 return bindings_tests(REFERENCE_DIRECTORY, verbose) |
| 369 with TemporaryDirectory() as temp_dir: | 369 with TemporaryDirectory() as temp_dir: |
| 370 return bindings_tests(temp_dir, verbose) | 370 return bindings_tests(temp_dir, verbose) |
| OLD | NEW |