Bug 49474

Summary: webkitpy.common.checkout.changelog_unittest fails under Win32 Python
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: abarth, dglazkov, dpranke, eric, paroga
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
Bug Depends on:    
Bug Blocks: 48728, 55811    

Adam Roben (:aroben)
Reported 2010-11-12 13:47:04 PST
To reproduce: 1. python WebKitTools\Scripts\test-webkitpy webkitpy.common.checkout.changelog_unittest It fails with the following output: ====================================================================== ERROR: test_update_for_revert (webkitpy.common.checkout.changelog_unittest.ChangeLogTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\cygwin\home\Adam Roben\dev\WebKit\OpenSource\WebKitTools\Scripts\webkitpy\common\checkout\changelog_unittest.py", line 198, in test_update_for_revert self._assert_update_for_revert_output([12345, "Reason"], self._revert_entry_without_bug_url) File "C:\cygwin\home\Adam Roben\dev\WebKit\OpenSource\WebKitTools\Scripts\webkitpy\common\checkout\changelog_unittest.py", line 191, in _assert_update_for_revert_output self.assertEquals(actual_entry.contents(), expected_entry) AttributeError: 'NoneType' object has no attribute 'contents' ====================================================================== FAIL: test_set_reviewer (webkitpy.common.checkout.changelog_unittest.ChangeLogTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\cygwin\home\Adam Roben\dev\WebKit\OpenSource\WebKitTools\Scripts\webkitpy\common\checkout\changelog_unittest.py", line 132, in test_set_reviewer self.assertEquals(actual_contents, expected_contents) AssertionError: u"2009-08-19 Eric Seidel <eric@webkit.org>\r\n\r\n Reviewed by Test Reviewer.\r\n\r\n Need a short description and bug URL (OOPS!)\r\n\r\n * Scripts/bugzilla-too l:\r\n\r\n2009-08-17 Tor Arne Vestb\xf8 <vestbo@webkit.org>\r\n\r\n <http://webkit.org/b/28393> check-webkit-style: add check for use of std::max()/std::min() instead of MAX()/MIN()\r\n\r\n Reviewed by David Levin.\r\n\r\n * Scripts/modules/cpp_style.py:\r\n (_ERROR_CATEGORIES): Added 'runtime/max_min_macros'.\r\n (check_max_min_macros): Added. Returns level 4 error when MAX()\r\n and MIN() macros are used in header files and C++ source files.\r\n (check_style): Added call to check_max_min_macros().\r\n * Scripts/modules/cpp_style_unit test.py: Added unit tests.\r\n (test_max_macro): Added.\r\n (test_min_macro): Added.\r\n\r\n2009-08-16 David Kilzer <ddkilzer@apple.com>\r\n\r\n Backed out r47343 which was mist akenly committed\r\n\r\n * Scripts/bugzilla-tool:\r\n * Scripts/modules/scm.py:\r\n\r\n2009-06-18 Darin Adler <darin@apple.com>\r\n\r\n Rubber stamped by Mark Rowe.\r\n\r\n * DumpRenderTree/mac/DumpRenderTreeWindow.mm:\r\n (-[DumpRenderTreeWindow close]): Resolved crashes seen during regression\r\n tests. The close method can be called on a window that's already closed\r\n so we can't assert here.\r\n\r\n== Rolled over to ChangeLog-2009-06-16 ==\r\n" != u"2009-08-19 Eric Seidel <eric@webkit.org>\n\n Reviewed by Test Reviewer.\n\n Need a short description and bug URL (OOPS!)\n\n * Scripts/bugzilla-tool:\n\n2009-08-17 Tor Arne Vestb\xf8 <vestbo@webkit.org>\n\n <http://webkit.org/b/28393> check-webkit-style: ad d check for use of std::max()/std::min() instead of MAX()/MIN()\n\n Reviewed by David Levin.\n\n * Scripts/modules/cpp_style.py:\n (_ERROR_CATEGORIES): Added 'runtime/max_min_macr os'.\n (check_max_min_macros): Added. Returns level 4 error when MAX()\n and MIN() macros are used in header files and C++ source files.\n (check_style): Added call to check_max_ min_macros().\n * Scripts/modules/cpp_style_unittest.py: Added unit tests.\n (test_max_macro): Added.\n (test_min_macro): Added.\n\n2009-08-16 David Kilzer <ddkilzer@apple.com>\ n\n Backed out r47343 which was mistakenly committed\n\n * Scripts/bugzilla-tool:\n * Scripts/modules/scm.py:\n\n2009-06-18 Darin Adler <darin@apple.com>\n\n Rubber stamp ed by Mark Rowe.\n\n * DumpRenderTree/mac/DumpRenderTreeWindow.mm:\n (-[DumpRenderTreeWindow close]): Resolved crashes seen during regression\n tests. The close method can be call ed on a window that's already closed\n so we can't assert here.\n\n== Rolled over to ChangeLog-2009-06-16 ==\n" ====================================================================== FAIL: test_set_short_description_and_bug_url (webkitpy.common.checkout.changelog_unittest.ChangeLogTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\cygwin\home\Adam Roben\dev\WebKit\OpenSource\WebKitTools\Scripts\webkitpy\common\checkout\changelog_unittest.py", line 144, in test_set_short_description_and_bug_url self.assertEquals(actual_contents, expected_contents) AssertionError: u"2009-08-19 Eric Seidel <eric@webkit.org>\r\n\r\n Reviewed by NOBODY (OOPS!).\r\n\r\n A short description\r\n http://example.com/b/2344\r\n\r\n * Scripts /bugzilla-tool:\r\n\r\n2009-08-17 Tor Arne Vestb\xf8 <vestbo@webkit.org>\r\n\r\n <http://webkit.org/b/28393> check-webkit-style: add check for use of std::max()/std::min() instead of MAX()/MI N()\r\n\r\n Reviewed by David Levin.\r\n\r\n * Scripts/modules/cpp_style.py:\r\n (_ERROR_CATEGORIES): Added 'runtime/max_min_macros'.\r\n (check_max_min_macros): Added. Re turns level 4 error when MAX()\r\n and MIN() macros are used in header files and C++ source files.\r\n (check_style): Added call to check_max_min_macros().\r\n * Scripts/modules/c pp_style_unittest.py: Added unit tests.\r\n (test_max_macro): Added.\r\n (test_min_macro): Added.\r\n\r\n2009-08-16 David Kilzer <ddkilzer@apple.com>\r\n\r\n Backed out r47343 w hich was mistakenly committed\r\n\r\n * Scripts/bugzilla-tool:\r\n * Scripts/modules/scm.py:\r\n\r\n2009-06-18 Darin Adler <darin@apple.com>\r\n\r\n Rubber stamped by Mark Rowe. \r\n\r\n * DumpRenderTree/mac/DumpRenderTreeWindow.mm:\r\n (-[DumpRenderTreeWindow close]): Resolved crashes seen during regression\r\n tests. The close method can be called on a window that's already closed\r\n so we can't assert here.\r\n\r\n== Rolled over to ChangeLog-2009-06-16 ==\r\n" != u"2009-08-19 Eric Seidel <eric@webkit.org>\n\n Reviewed by NOBODY (OO PS!).\n\n A short description\n http://example.com/b/2344\n\n * Scripts/bugzilla-tool:\n\n2009-08-17 Tor Arne Vestb\xf8 <vestbo@webkit.org>\n\n <http://webkit.org/b/28393 > check-webkit-style: add check for use of std::max()/std::min() instead of MAX()/MIN()\n\n Reviewed by David Levin.\n\n * Scripts/modules/cpp_style.py:\n (_ERROR_CATEGORIES): Add ed 'runtime/max_min_macros'.\n (check_max_min_macros): Added. Returns level 4 error when MAX()\n and MIN() macros are used in header files and C++ source files.\n (check_style): Added call to check_max_min_macros().\n * Scripts/modules/cpp_style_unittest.py: Added unit tests.\n (test_max_macro): Added.\n (test_min_macro): Added.\n\n2009-08-16 David Kilze r <ddkilzer@apple.com>\n\n Backed out r47343 which was mistakenly committed\n\n * Scripts/bugzilla-tool:\n * Scripts/modules/scm.py:\n\n2009-06-18 Darin Adler <darin@apple.com> \n\n Rubber stamped by Mark Rowe.\n\n * DumpRenderTree/mac/DumpRenderTreeWindow.mm:\n (-[DumpRenderTreeWindow close]): Resolved crashes seen during regression\n tests. The close method can be called on a window that's already closed\n so we can't assert here.\n\n== Rolled over to ChangeLog-2009-06-16 ==\n"
Attachments
Adam Roben (:aroben)
Comment 1 2010-11-12 13:47:51 PST
The actual_contents has \r\n line-endings, while the expected_contents has \n line-endings. It looks like \n is being turned into \r\n by FileInput, which opens the fake sys.stdout in text mode, not binary mode.
Patrick R. Gansterer
Comment 2 2011-07-25 21:23:15 PDT
*** This bug has been marked as a duplicate of bug 64956 ***
Note You need to log in before you can comment on or make changes to this bug.