Title: [204376] trunk/Tools
Revision
204376
Author
[email protected]
Date
2016-08-11 10:42:27 -0700 (Thu, 11 Aug 2016)

Log 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):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (204375 => 204376)


--- trunk/Tools/ChangeLog	2016-08-11 16:34:23 UTC (rev 204375)
+++ trunk/Tools/ChangeLog	2016-08-11 17:42:27 UTC (rev 204376)
@@ -1,3 +1,19 @@
+2016-08-11  Per Arne Vollan  <[email protected]>
+
+        [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):
+
 2016-08-10  Alex Christensen  <[email protected]>
 
         Fix crash when changing cookie accept policy after r204327

Modified: trunk/Tools/Scripts/webkitpy/common/system/path.py (204375 => 204376)


--- trunk/Tools/Scripts/webkitpy/common/system/path.py	2016-08-11 16:34:23 UTC (rev 204375)
+++ trunk/Tools/Scripts/webkitpy/common/system/path.py	2016-08-11 17:42:27 UTC (rev 204376)
@@ -30,6 +30,7 @@
 
 import atexit
 import os
+import re
 import subprocess
 import sys
 import logging
@@ -78,10 +79,11 @@
                 # Make sure the cygpath subprocess always gets shutdown cleanly.
                 atexit.register(_CygPath.stop_cygpath_subprocess)
 
-            return _CygPath._singleton.convert(path)
+            return _CygPath._singleton.convertFast(path)
 
     def __init__(self):
         self._child_process = None
+        self._rootDict = {}
 
     def start(self):
         assert(self._child_process is None)
@@ -118,6 +120,24 @@
         windows_path = '%s%s' % (windows_path[0].upper(), windows_path[1:])
         return windows_path
 
+    def convertFast(self, path):
+        # Use a dictionary to store previously converted file system roots.
+        match = re.match('(^/cygdrive/./)(.+)', path)
+        if not match:
+            match = re.match('(^/)(.+)', path)
+        if match:
+            try:
+                root = self._rootDict[match.group(1)]
+            except:
+                self._rootDict[match.group(1)] = self.convert(match.group(1))
+                root = self._rootDict[match.group(1)]
+            if not root.endswith('\\'):
+                root += '\\'
+            path = root + match.group(2)
+            path = re.sub('/', r'\\', path)
+            return path
+        else:
+            self.convert(path)
 
 def _escape(path):
     """Handle any characters in the path that should be escaped."""
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to