| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 from code_generator_web_module import CodeGeneratorWebModule | 47 from code_generator_web_module import CodeGeneratorWebModule |
| 48 from compute_interfaces_info_individual import InterfaceInfoCollector | 48 from compute_interfaces_info_individual import InterfaceInfoCollector |
| 49 from compute_interfaces_info_overall import (compute_interfaces_info_overall, | 49 from compute_interfaces_info_overall import (compute_interfaces_info_overall, |
| 50 interfaces_info) | 50 interfaces_info) |
| 51 from idl_compiler import (generate_bindings, | 51 from idl_compiler import (generate_bindings, |
| 52 generate_union_type_containers, | 52 generate_union_type_containers, |
| 53 generate_dictionary_impl, | 53 generate_dictionary_impl, |
| 54 generate_callback_function_impl) | 54 generate_callback_function_impl) |
| 55 from utilities import ComponentInfoProviderCore | 55 from utilities import ComponentInfoProviderCore |
| 56 from utilities import ComponentInfoProviderModules | 56 from utilities import ComponentInfoProviderModules |
| 57 from utilities import write_file | |
| 58 | 57 |
| 59 | 58 |
| 60 PASS_MESSAGE = 'All tests PASS!' | 59 PASS_MESSAGE = 'All tests PASS!' |
| 61 FAIL_MESSAGE = """Some tests FAIL! | 60 FAIL_MESSAGE = """Some tests FAIL! |
| 62 To update the reference files, execute: | 61 To update the reference files, execute: |
| 63 run-bindings-tests --reset-results | 62 run-bindings-tests --reset-results |
| 64 | 63 |
| 65 If the failures are not due to your changes, test results may be out of sync; | 64 If the failures are not due to your changes, test results may be out of sync; |
| 66 please rebaseline them in a separate CL, after checking that tests fail in ToT. | 65 please rebaseline them in a separate CL, after checking that tests fail in ToT. |
| 67 In CL, please set: | 66 In CL, please set: |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 | 376 |
| 378 | 377 |
| 379 def run_bindings_tests(reset_results, verbose): | 378 def run_bindings_tests(reset_results, verbose): |
| 380 # Generate output into the reference directory if resetting results, or | 379 # Generate output into the reference directory if resetting results, or |
| 381 # a temp directory if not. | 380 # a temp directory if not. |
| 382 if reset_results: | 381 if reset_results: |
| 383 print 'Resetting results' | 382 print 'Resetting results' |
| 384 return bindings_tests(reference_directory, verbose) | 383 return bindings_tests(reference_directory, verbose) |
| 385 with TemporaryDirectory() as temp_dir: | 384 with TemporaryDirectory() as temp_dir: |
| 386 return bindings_tests(temp_dir, verbose) | 385 return bindings_tests(temp_dir, verbose) |
| OLD | NEW |