Bug 34070

Summary: Fix failure of webkit-patch unit test webkitpy.scm_unittest.SCMClassTests.test_error_handlers
Product: WebKit Reporter: Daniel Bates <dbates>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch with unit test abarth: review+

Daniel Bates
Reported 2010-01-24 23:23:14 PST
Following up on Eric Seidel's comment <https://bugs.webkit.org/show_bug.cgi?id=32896#c10>, the changes introduced in the patch for bug #32896 caused the method webkitpy.scm_unittest.SCMClassTests.test_error_handlers to fail with the following error: ====================================================================== ERROR: test_error_handlers (webkitpy.scm_unittest.SCMClassTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/dbates/Desktop/WebKit/WebKitTools/Scripts/webkitpy/scm_unittest.py", line 150, in test_error_handlers self.assertRaises(OSError, run_command, command_does_not_exist) File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 336, in failUnlessRaises callableObj(*args, **kwargs) File "/Users/dbates/Desktop/WebKit/WebKitTools/Scripts/webkitpy/executive.py", line 70, in run_command return Executive().run_command(*args, **kwargs) File "/Users/dbates/Desktop/WebKit/WebKitTools/Scripts/webkitpy/executive.py", line 142, in run_command (error_handler or self.default_error_handler)(script_error) File "/Users/dbates/Desktop/WebKit/WebKitTools/Scripts/webkitpy/executive.py", line 113, in default_error_handler raise error ScriptError: Failed to run "['does_not_exist', 'invalid_option']" exit_code: 2
Attachments
Patch with unit test (4.73 KB, patch)
2010-01-24 23:26 PST, Daniel Bates
abarth: review+
Daniel Bates
Comment 1 2010-01-24 23:26:52 PST
Created attachment 47317 [details] Patch with unit test Moves the try/catch for OSError exceptions in Executive.run_command to Credentials.read_credentials() so that the unit test webkitpy.scm_unittest.SCMClassTests.test_error_handlers can assert that Executive.run_command throws an OSError exception. Updated unit tests accordingly.
Adam Barth
Comment 2 2010-01-25 02:45:54 PST
Comment on attachment 47317 [details] Patch with unit test Thanks!
Daniel Bates
Comment 3 2010-01-26 21:26:27 PST
Note You need to log in before you can comment on or make changes to this bug.