| 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 24 matching lines...) Expand all Loading... |
| 35 class BindingsTests: | 35 class BindingsTests: |
| 36 | 36 |
| 37 def __init__(self, reset_results, executive): | 37 def __init__(self, reset_results, executive): |
| 38 self.reset_results = reset_results | 38 self.reset_results = reset_results |
| 39 self.executive = executive | 39 self.executive = executive |
| 40 | 40 |
| 41 def generate_from_idl(self, idl_file, output_directory, supplemental_depende
ncy_file): | 41 def generate_from_idl(self, idl_file, output_directory, supplemental_depende
ncy_file): |
| 42 cmd = ['perl', '-w', | 42 cmd = ['perl', '-w', |
| 43 '-Ibindings/scripts', | 43 '-Ibindings/scripts', |
| 44 '-Icore/scripts', | 44 '-Icore/scripts', |
| 45 '-I../../JSON/out/lib/perl5', |
| 45 'bindings/scripts/generate-bindings.pl', | 46 'bindings/scripts/generate-bindings.pl', |
| 46 # idl include directories (path relative to generate-bindings.pl) | 47 # idl include directories (path relative to generate-bindings.pl) |
| 47 '--include', '.', | 48 '--include', '.', |
| 48 '--outputDir', output_directory, | 49 '--outputDir', output_directory, |
| 49 '--supplementalDependencyFile', supplemental_dependency_file, | 50 '--supplementalDependencyFile', supplemental_dependency_file, |
| 50 '--idlAttributesFile', 'bindings/scripts/IDLAttributes.txt', | 51 '--idlAttributesFile', 'bindings/scripts/IDLAttributes.txt', |
| 51 idl_file] | 52 idl_file] |
| 52 | 53 |
| 53 exit_code = 0 | 54 exit_code = 0 |
| 54 try: | 55 try: |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 all_tests_passed = False | 161 all_tests_passed = False |
| 161 | 162 |
| 162 os.remove(supplemental_dependency_file) | 163 os.remove(supplemental_dependency_file) |
| 163 print '' | 164 print '' |
| 164 if all_tests_passed: | 165 if all_tests_passed: |
| 165 print 'All tests PASS!' | 166 print 'All tests PASS!' |
| 166 return 0 | 167 return 0 |
| 167 else: | 168 else: |
| 168 print 'Some tests FAIL! (To update the reference files, execute "run
-bindings-tests --reset-results")' | 169 print 'Some tests FAIL! (To update the reference files, execute "run
-bindings-tests --reset-results")' |
| 169 return -1 | 170 return -1 |
| OLD | NEW |