| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 self.output_directory = provider.new_temp_dir() | 107 self.output_directory = provider.new_temp_dir() |
| 108 self.event_names_filename = os.path.join(self.output_directory, 'EventIn
terfaces.in') | 108 self.event_names_filename = os.path.join(self.output_directory, 'EventIn
terfaces.in') |
| 109 | 109 |
| 110 def run_command(self, cmd): | 110 def run_command(self, cmd): |
| 111 output = self.executive.run_command(cmd) | 111 output = self.executive.run_command(cmd) |
| 112 if output: | 112 if output: |
| 113 print output | 113 print output |
| 114 | 114 |
| 115 def generate_from_idl(self, idl_file): | 115 def generate_from_idl(self, idl_file): |
| 116 cmd = ['python', | 116 cmd = ['python', |
| 117 'bindings/scripts/unstable/idl_compiler.py', | 117 'bindings/scripts/idl_compiler.py', |
| 118 '--output-dir', self.output_directory, | 118 '--output-dir', self.output_directory, |
| 119 '--idl-attributes-file', 'bindings/IDLExtendedAttributes.txt', | 119 '--idl-attributes-file', 'bindings/IDLExtendedAttributes.txt', |
| 120 '--interfaces-info-file', self.interfaces_info_filename, | 120 '--interfaces-info-file', self.interfaces_info_filename, |
| 121 idl_file] | 121 idl_file] |
| 122 try: | 122 try: |
| 123 self.run_command(cmd) | 123 self.run_command(cmd) |
| 124 except ScriptError, e: | 124 except ScriptError, e: |
| 125 print 'ERROR: idl_compiler.py: ' + os.path.basename(idl_file) | 125 print 'ERROR: idl_compiler.py: ' + os.path.basename(idl_file) |
| 126 print e.output | 126 print e.output |
| 127 return e.exit_code | 127 return e.exit_code |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 print PASS_MESSAGE | 281 print PASS_MESSAGE |
| 282 return 0 | 282 return 0 |
| 283 print | 283 print |
| 284 print FAIL_MESSAGE | 284 print FAIL_MESSAGE |
| 285 return -1 | 285 return -1 |
| 286 | 286 |
| 287 | 287 |
| 288 def run_bindings_tests(reset_results, verbose): | 288 def run_bindings_tests(reset_results, verbose): |
| 289 with ScopedTempFileProvider() as provider: | 289 with ScopedTempFileProvider() as provider: |
| 290 return BindingsTests(reset_results, verbose, provider).main() | 290 return BindingsTests(reset_results, verbose, provider).main() |
| OLD | NEW |