Title: [204123] trunk/Tools
Revision
204123
Author
pvol...@apple.com
Date
2016-08-04 10:02:42 -0700 (Thu, 04 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 (204122 => 204123)


--- trunk/Tools/ChangeLog	2016-08-04 16:28:17 UTC (rev 204122)
+++ trunk/Tools/ChangeLog	2016-08-04 17:02:42 UTC (rev 204123)
@@ -1,3 +1,19 @@
+2016-08-04  Per Arne Vollan  <pvol...@apple.com>
+
+        [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-03  Aakash Jain  <aakash_j...@apple.com>
 
         Document instructions for increasing process and file limits

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


--- trunk/Tools/Scripts/webkitpy/common/system/path.py	2016-08-04 16:28:17 UTC (rev 204122)
+++ trunk/Tools/Scripts/webkitpy/common/system/path.py	2016-08-04 17:02:42 UTC (rev 204123)
@@ -30,6 +30,7 @@
 
 import atexit
 import os
+import re
 import subprocess
 import sys
 import logging
@@ -51,6 +52,13 @@
     return path
 
 
+def cygpathFast(path):
+    """Converts an absolute cygwin path to an absolute Windows path with string replacement."""
+    if sys.platform == 'cygwin':
+        path = re.sub('/cygdrive/c', 'c:', path)
+        path = re.sub('/', r'\\', path)
+    return path
+
 # Note that this object is not threadsafe and must only be called
 # from multiple threads under protection of a lock (as is done in cygpath())
 class _CygPath(object):

Modified: trunk/Tools/Scripts/webkitpy/port/driver.py (204122 => 204123)


--- trunk/Tools/Scripts/webkitpy/port/driver.py	2016-08-04 16:28:17 UTC (rev 204122)
+++ trunk/Tools/Scripts/webkitpy/port/driver.py	2016-08-04 17:02:42 UTC (rev 204123)
@@ -456,7 +456,7 @@
         else:
             command = self._port.abspath_for_test(driver_input.test_name)
             if sys.platform == 'cygwin':
-                command = path.cygpath(command)
+                command = path.cygpathFast(command)
 
         assert not driver_input.image_hash or driver_input.should_run_pixel_test
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to