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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 info_collector.collect_info(idl_path) | 126 info_collector.collect_info(idl_path) |
127 info = info_collector.get_info_as_dict() | 127 info = info_collector.get_info_as_dict() |
128 # TestDictionary.{h,cpp} are placed under | 128 # TestDictionary.{h,cpp} are placed under |
129 # Source/bindings/tests/idls/core. However, IdlCompiler generates | 129 # Source/bindings/tests/idls/core. However, IdlCompiler generates |
130 # TestDictionary.{h,cpp} by using relative_dir. | 130 # TestDictionary.{h,cpp} by using relative_dir. |
131 # So the files will be generated under | 131 # So the files will be generated under |
132 # output_dir/core/bindings/tests/idls/core. | 132 # output_dir/core/bindings/tests/idls/core. |
133 # To avoid this issue, we need to clear relative_dir here. | 133 # To avoid this issue, we need to clear relative_dir here. |
134 for value in info['interfaces_info'].itervalues(): | 134 for value in info['interfaces_info'].itervalues(): |
135 value['relative_dir'] = '' | 135 value['relative_dir'] = '' |
| 136 # Merge component-wide information. |
| 137 component_wide_info = info_collector.get_component_wide_info_as_dict() |
| 138 info.update(component_wide_info) |
136 return info | 139 return info |
137 | 140 |
138 # We compute interfaces info for *all* IDL files, not just test IDL | 141 # We compute interfaces info for *all* IDL files, not just test IDL |
139 # files, as code generator output depends on inheritance (both ancestor | 142 # files, as code generator output depends on inheritance (both ancestor |
140 # chain and inherited extended attributes), and some real interfaces | 143 # chain and inherited extended attributes), and some real interfaces |
141 # are special-cased, such as Node. | 144 # are special-cased, such as Node. |
142 # | 145 # |
143 # For example, when testing the behavior of interfaces that inherit | 146 # For example, when testing the behavior of interfaces that inherit |
144 # from Node, we also need to know that these inherit from EventTarget, | 147 # from Node, we also need to know that these inherit from EventTarget, |
145 # since this is also special-cased and Node inherits from EventTarget, | 148 # since this is also special-cased and Node inherits from EventTarget, |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 | 338 |
336 | 339 |
337 def run_bindings_tests(reset_results, verbose): | 340 def run_bindings_tests(reset_results, verbose): |
338 # Generate output into the reference directory if resetting results, or | 341 # Generate output into the reference directory if resetting results, or |
339 # a temp directory if not. | 342 # a temp directory if not. |
340 if reset_results: | 343 if reset_results: |
341 print 'Resetting results' | 344 print 'Resetting results' |
342 return bindings_tests(reference_directory, verbose) | 345 return bindings_tests(reference_directory, verbose) |
343 with TemporaryDirectory() as temp_dir: | 346 with TemporaryDirectory() as temp_dir: |
344 return bindings_tests(temp_dir, verbose) | 347 return bindings_tests(temp_dir, verbose) |
OLD | NEW |