webkitpy.common.net.testoutputset_unittest.TestOutputSetTest.test_can_infer_platform_from_path_if_none_provided fails on win32
https://bugs.webkit.org/show_bug.cgi?id=54525
Summary webkitpy.common.net.testoutputset_unittest.TestOutputSetTest.test_can_infer_p...
Dirk Pranke
Reported 2011-02-15 19:49:08 PST
There's actually a couple of places that get confused by os.path.sep being '\\' on win32, but in this particular test it's not clear what the right fix is, since I'm not sure if zip files should follow the platform, or always use '/'.
Attachments
Patch (1.99 KB, patch)
2011-02-17 19:23 PST, Dirk Pranke
no flags
Dirk Pranke
Comment 1 2011-02-17 19:23:14 PST
Dirk Pranke
Comment 2 2011-02-17 19:54:20 PST
Note that we don't actually want to land/review the patch I just uploaded. We can handle the skipping via the blacklist in bug 54709 and should use this bug to fix it properly.
Dirk Pranke
Comment 3 2011-02-18 19:32:08 PST
The issue is that we insert file paths into the zip file with forward slashes as separators, but when we turn the file path into a filesethandle, we use the native filesystem, which on win32 uses backward slashes as separators. Hence we fail to parse the path correctly and don't extract the "win" component properly. I'm not sure what the right fix is. I'm pretty sure zip files will always return forward slashes, so I think that part of the code is acting correctly. Perhaps the TestOutput and TestOutputSet() classes should have a filesystem handles passed to their constructors, and we should always pass it MockFileSystems (or some other filesystem-interface-implement object) when we're extracting zip files using TestOutputSet().from_zip() or TestOutputSet().from_zip_url()? Koz, you wrote this code, does that sound about right?
Dirk Pranke
Comment 4 2011-05-31 18:37:48 PDT
disclaiming ownership on this, in case anyone else wants to work on it.
Note You need to log in before you can comment on or make changes to this bug.