| 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 10 matching lines...) Expand all Loading... |
| 21 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 21 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 22 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 23 # | 23 # |
| 24 | 24 |
| 25 import os | 25 import os |
| 26 import shutil | 26 import shutil |
| 27 import tempfile | 27 import tempfile |
| 28 from webkitpy.common.checkout.scm.detection import detect_scm_system | 28 from webkitpy.common.checkout.scm.detection import detect_scm_system |
| 29 from webkitpy.common.system.executive import ScriptError | 29 from webkitpy.common.system.executive import ScriptError |
| 30 | 30 |
| 31 PASS_MESSAGE = 'All tests PASS!' |
| 32 FAIL_MESSAGE = """Some tests FAIL! |
| 33 To update the reference files, execute: |
| 34 run-bindings-tests --reset-results |
| 35 |
| 36 If the failures are not due to your changes, test results may be out of sync; |
| 37 please rebaseline them in a separate CL, after checking that tests fail in ToT. |
| 38 In CL, please set: |
| 39 NOTRY=true |
| 40 TBR=(someone in Source/bindings/OWNERS or WATCHLISTS:bindings) |
| 41 """ |
| 42 |
| 31 # Python compiler is incomplete; skip IDLs with unimplemented features | 43 # Python compiler is incomplete; skip IDLs with unimplemented features |
| 32 SKIP_PYTHON = set([ | 44 SKIP_PYTHON = set([ |
| 33 'TestActiveDOMObject.idl', | 45 'TestActiveDOMObject.idl', |
| 34 'TestCallback.idl', | 46 'TestCallback.idl', |
| 35 'TestCustomAccessors.idl', | 47 'TestCustomAccessors.idl', |
| 36 'TestEvent.idl', | 48 'TestEvent.idl', |
| 37 'TestEventConstructor.idl', | 49 'TestEventConstructor.idl', |
| 38 'TestEventTarget.idl', | 50 'TestEventTarget.idl', |
| 39 'TestException.idl', | 51 'TestException.idl', |
| 40 'TestExtendedEvent.idl', | 52 'TestExtendedEvent.idl', |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 current_scm = detect_scm_system(os.curdir) | 271 current_scm = detect_scm_system(os.curdir) |
| 260 os.chdir(os.path.join(current_scm.checkout_root, 'Source')) | 272 os.chdir(os.path.join(current_scm.checkout_root, 'Source')) |
| 261 | 273 |
| 262 if self.generate_interface_dependencies(): | 274 if self.generate_interface_dependencies(): |
| 263 print 'Failed to generate interface dependencies file.' | 275 print 'Failed to generate interface dependencies file.' |
| 264 return -1 | 276 return -1 |
| 265 | 277 |
| 266 all_tests_passed = self.run_tests() | 278 all_tests_passed = self.run_tests() |
| 267 print | 279 print |
| 268 if all_tests_passed: | 280 if all_tests_passed: |
| 269 print 'All tests PASS!' | 281 print PASS_MESSAGE |
| 270 return 0 | 282 return 0 |
| 271 print 'Some tests FAIL! (To update the reference files, execute "run-bin
dings-tests --reset-results")' | 283 print FAIL_MESSAGE |
| 272 return -1 | 284 return -1 |
| OLD | NEW |