Changeset 204376 in webkit


Ignore:
Timestamp:
Aug 11, 2016 10:42:27 AM (8 years ago)
Author:
pvollan@apple.com
Message:

[Win] Unable to reliably run tests in parallel
https://bugs.webkit.org/show_bug.cgi?id=140914

Reviewed by Brent Fulgham.

The cygpath utility function can fail badly when running with multiple DumpRenderTree
processes. We can use string replacement to convert the Cygwin path to a Windows path
instead.

  • Scripts/webkitpy/common/system/path.py:

(cygpathFast):

  • Scripts/webkitpy/port/driver.py:

(Driver._command_from_driver_input):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r204365 r204376  
     12016-08-11  Per Arne Vollan  <pvollan@apple.com>
     2
     3        [Win] Unable to reliably run tests in parallel
     4        https://bugs.webkit.org/show_bug.cgi?id=140914
     5
     6        Reviewed by Brent Fulgham.
     7
     8        The cygpath utility function can fail badly when running with multiple DumpRenderTree
     9        processes. We can use string replacement to convert the Cygwin path to a Windows path
     10        instead.
     11
     12        * Scripts/webkitpy/common/system/path.py:
     13        (cygpathFast):
     14        * Scripts/webkitpy/port/driver.py:
     15        (Driver._command_from_driver_input):
     16
    1172016-08-10  Alex Christensen  <achristensen@webkit.org>
    218
  • trunk/Tools/Scripts/webkitpy/common/system/path.py

    r204167 r204376  
    3131import atexit
    3232import os
     33import re
    3334import subprocess
    3435import sys
     
    7980                atexit.register(_CygPath.stop_cygpath_subprocess)
    8081
    81             return _CygPath._singleton.convert(path)
     82            return _CygPath._singleton.convertFast(path)
    8283
    8384    def __init__(self):
    8485        self._child_process = None
     86        self._rootDict = {}
    8587
    8688    def start(self):
     
    119121        return windows_path
    120122
     123    def convertFast(self, path):
     124        # Use a dictionary to store previously converted file system roots.
     125        match = re.match('(^/cygdrive/./)(.+)', path)
     126        if not match:
     127            match = re.match('(^/)(.+)', path)
     128        if match:
     129            try:
     130                root = self._rootDict[match.group(1)]
     131            except:
     132                self._rootDict[match.group(1)] = self.convert(match.group(1))
     133                root = self._rootDict[match.group(1)]
     134            if not root.endswith('\\'):
     135                root += '\\'
     136            path = root + match.group(2)
     137            path = re.sub('/', r'\\', path)
     138            return path
     139        else:
     140            self.convert(path)
    121141
    122142def _escape(path):
Note: See TracChangeset for help on using the changeset viewer.