| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 self.event_names_filename = os.path.join(reference_directory, 'Event
Interfaces.in') | 91 self.event_names_filename = os.path.join(reference_directory, 'Event
Interfaces.in') |
| 92 else: | 92 else: |
| 93 _, self.event_names_filename = provider.newtempfile() | 93 _, self.event_names_filename = provider.newtempfile() |
| 94 | 94 |
| 95 def run_command(self, cmd): | 95 def run_command(self, cmd): |
| 96 return self.executive.run_command(cmd) | 96 return self.executive.run_command(cmd) |
| 97 | 97 |
| 98 def generate_from_idl_pl(self, idl_file, output_directory): | 98 def generate_from_idl_pl(self, idl_file, output_directory): |
| 99 cmd = ['perl', '-w', | 99 cmd = ['perl', '-w', |
| 100 '-Ibindings/scripts', | 100 '-Ibindings/scripts', |
| 101 '-Ibuild/scripts', |
| 101 '-Icore/scripts', | 102 '-Icore/scripts', |
| 102 '-I../../JSON/out/lib/perl5', | 103 '-I../../JSON/out/lib/perl5', |
| 103 'bindings/scripts/generate_bindings.pl', | 104 'bindings/scripts/generate_bindings.pl', |
| 104 # idl include directories (path relative to generate-bindings.pl) | 105 # idl include directories (path relative to generate-bindings.pl) |
| 105 '--include', '.', | 106 '--include', '.', |
| 106 '--outputDir', output_directory, | 107 '--outputDir', output_directory, |
| 107 '--interfaceDependenciesFile', self.interface_dependencies_filena
me, | 108 '--interfaceDependenciesFile', self.interface_dependencies_filena
me, |
| 108 '--idlAttributesFile', 'bindings/scripts/IDLAttributes.txt', | 109 '--idlAttributesFile', 'bindings/scripts/IDLAttributes.txt', |
| 109 idl_file] | 110 idl_file] |
| 110 try: | 111 try: |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 print 'Failed to generate interface dependencies file.' | 251 print 'Failed to generate interface dependencies file.' |
| 251 return -1 | 252 return -1 |
| 252 | 253 |
| 253 all_tests_passed = self.run_tests() | 254 all_tests_passed = self.run_tests() |
| 254 print | 255 print |
| 255 if all_tests_passed: | 256 if all_tests_passed: |
| 256 print 'All tests PASS!' | 257 print 'All tests PASS!' |
| 257 return 0 | 258 return 0 |
| 258 print 'Some tests FAIL! (To update the reference files, execute "run-bin
dings-tests --reset-results")' | 259 print 'Some tests FAIL! (To update the reference files, execute "run-bin
dings-tests --reset-results")' |
| 259 return -1 | 260 return -1 |
| OLD | NEW |