RESOLVED FIXED 39257
Chromium: new-run-webkit-httpd fails to setup_mount
https://bugs.webkit.org/show_bug.cgi?id=39257
Summary Chromium: new-run-webkit-httpd fails to setup_mount
Fumitoshi Ukai
Reported 2010-05-17 19:02:35 PDT
Attachments
Patch (1.45 KB, patch)
2010-05-17 19:08 PDT, Fumitoshi Ukai
no flags
Patch (4.93 KB, patch)
2010-05-17 19:42 PDT, Fumitoshi Ukai
no flags
Patch (7.41 KB, patch)
2010-05-17 20:13 PDT, Fumitoshi Ukai
ukai: review-
Patch (7.32 KB, patch)
2010-05-17 20:16 PDT, Fumitoshi Ukai
no flags
Patch (7.50 KB, patch)
2010-05-17 22:27 PDT, Fumitoshi Ukai
eric: review+
Fumitoshi Ukai
Comment 1 2010-05-17 19:08:31 PDT
Eric Seidel (no email)
Comment 2 2010-05-17 19:11:27 PDT
Comment on attachment 56306 [details] Patch LGTM. A unit test would be even better. There is a MockExecutive inside mocktool.py which knows how to log arguments. outputcapture.py can be used to assert that the right output was logged.
Fumitoshi Ukai
Comment 3 2010-05-17 19:42:15 PDT
Fumitoshi Ukai
Comment 4 2010-05-17 19:43:13 PDT
(In reply to comment #2) > (From update of attachment 56306 [details]) > LGTM. A unit test would be even better. There is a MockExecutive inside mocktool.py which knows how to log arguments. outputcapture.py can be used to assert that the right output was logged. Thanks for review. Added a unit test.
Eric Seidel (no email)
Comment 5 2010-05-17 20:01:10 PDT
Comment on attachment 56309 [details] Patch WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:47 + expected_stdout="", These default to "", so the explicit ="" are not needed. WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:51 + orig_platform = sys.platform I would have abstracted that code into some sort of setup/teardown function. If we wanted to get fancy we could use python 2.5+ contextual objects and a with statement, but that's probably overkill. WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:62 + expected_stdout="", Not needed, defaults to "" LGTM otherwise.
Fumitoshi Ukai
Comment 6 2010-05-17 20:13:46 PDT
Fumitoshi Ukai
Comment 7 2010-05-17 20:16:13 PDT
Eric Seidel (no email)
Comment 8 2010-05-17 22:13:23 PDT
Comment on attachment 56314 [details] Patch WebKitTools/Scripts/webkitpy/common/system/executive.py:268 + if not isinstance(args, list) and not isinstance(args, tuple): I think assert(isinstance(args, list) or isinstance(args, tuple)) would be clearer. ScriptError is generally used for when the script being run has a error. WebKitTools/Scripts/webkitpy/common/system/executive_unittest.py:47 + self.assertRaises(ScriptError, executive.run_command, "echo") This would be AssertionError then. WebKitTools/Scripts/webkitpy/common/system/executive_unittest.py:49 + executive.run_command(["echo", "foo"]) Is this going to end up outputing "foo" on the console when test-webkitpy is run? WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:59 + setup_mount = port.path_from_chromium_base("third_party", This will fail to run in a non-chromium environment. Instead you should mock out path_from_chromium_base for the test, no? r- because the test would fail from a normal webkit checkout.
Fumitoshi Ukai
Comment 9 2010-05-17 22:27:41 PDT
Fumitoshi Ukai
Comment 10 2010-05-17 22:29:44 PDT
Thanks for review! (In reply to comment #8) > (From update of attachment 56314 [details]) > WebKitTools/Scripts/webkitpy/common/system/executive.py:268 > + if not isinstance(args, list) and not isinstance(args, tuple): > I think assert(isinstance(args, list) or isinstance(args, tuple)) would be clearer. ScriptError is generally used for when the script being run has a error. I see. Fixed. > > WebKitTools/Scripts/webkitpy/common/system/executive_unittest.py:47 > + self.assertRaises(ScriptError, executive.run_command, "echo") > This would be AssertionError then. Fixed. > > WebKitTools/Scripts/webkitpy/common/system/executive_unittest.py:49 > + executive.run_command(["echo", "foo"]) > Is this going to end up outputing "foo" on the console when test-webkitpy is run? "foo\n" will be returned from run_command, not to show on console. > WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:59 > + setup_mount = port.path_from_chromium_base("third_party", > This will fail to run in a non-chromium environment. Instead you should mock out path_from_chromium_base for the test, no? Ah. Fixed by using mock_path_from_chromium_base. > r- because the test would fail from a normal webkit checkout. Tested in normal webkit checkout.
Eric Seidel (no email)
Comment 11 2010-05-18 01:35:59 PDT
Comment on attachment 56322 [details] Patch OK.
Fumitoshi Ukai
Comment 12 2010-05-18 01:52:41 PDT
Note You need to log in before you can comment on or make changes to this bug.