[Webkit-unassigned] [Bug 47240] new-run-webkit-tests: getting an "error 2" back from ImageDiff

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 17 18:30:13 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=47240





--- Comment #12 from Dirk Pranke <dpranke at chromium.org>  2011-08-17 18:30:12 PST ---
(In reply to comment #10)
> OK, isolated the problem:
> 
> the new-run-webkit-tests  version of /tmp refers to my cygwin environment temp.  the ImageDiff  /tmp refers to the windows environment, C:\tmp.
> 

It sounds like we simply need to wrap the paths we are passing to ImageDiff in calls to cygpath() to get them converted to the native win32 paths.

Try changing ChromiumPort.diff_image() in chromium.py to something like the following (trying from memory; don't have a win machine in front of me to test):

        tempdir = self._filesystem.mkdtemp()                                    
        expected_filename = self._filesystem.join(str(tempdir), "expected.png") 
        self._filesystem.write_binary_file(expected_filename, expected_contents)
        actual_filename = self._filesystem.join(str(tempdir), "actual.png")     
        self._filesystem.write_binary_file(actual_filename, actual_contents)    

        if sys.platform == 'cygwin':
            native_expected_filename = path.cygpath(expected_filename)
            native_actual_filename = path.cygpath(actual_filename)
            if diff_filename:
                 native_diff_filename = path.cygpath(diff_filename)
        else:
            native_expected_filename = expected_filename
            native_actual_filename = actual_filename
            if diff_filename:
                 native_diff_filename = diff_filename

        executable = self._path_to_image_diff()                                 
        if diff_filename:                                                       
            cmd = [executable, '--diff', native_expected_filename,                     
                   native_actual_filename, native_diff_filename]                              
        else:                                                                   
            cmd = [executable, native_expected_filename, native_actual_filename]              

If this doesn't work, I can track down the right incantation necessary tomorrow. We shouldn't have to do the more complicated things you're suggesting since cygpath() can handle the conversions for us.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list