Bug 54525

Summary: webkitpy.common.net.testoutputset_unittest.TestOutputSetTest.test_can_infer_platform_from_path_if_none_provided fails on win32
Product: WebKit Reporter: Dirk Pranke <dpranke>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: abarth, aroben, eric, koz, mihaip, tony
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 48728    
Attachments:
Description Flags
Patch none

Description Dirk Pranke 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 '/'.
Comment 1 Dirk Pranke 2011-02-17 19:23:14 PST
Created attachment 82902 [details]
Patch
Comment 2 Dirk Pranke 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.
Comment 3 Dirk Pranke 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?
Comment 4 Dirk Pranke 2011-05-31 18:37:48 PDT
disclaiming ownership on this, in case anyone else wants to work on it.