Changeset 69674 in webkit
- Timestamp:
- Oct 13, 2010 11:10:35 AM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r69673 r69674 1 2010-10-13 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r69638. 4 http://trac.webkit.org/changeset/69638 5 https://bugs.webkit.org/show_bug.cgi?id=47595 6 7 "Broke win and chromium-win bots" (Requested by dglazkov on 8 #webkit). 9 10 * Scripts/webkitpy/common/system/path.py: 11 * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py: 12 * Scripts/webkitpy/layout_tests/port/base.py: 13 * Scripts/webkitpy/layout_tests/port/base_unittest.py: 14 * Scripts/webkitpy/layout_tests/port/chromium.py: 15 * Scripts/webkitpy/layout_tests/run_webkit_tests.py: 16 1 17 2010-10-13 John Knottenbelt <jknotten@chromium.org> 2 18 -
trunk/WebKitTools/Scripts/webkitpy/common/system/path.py
r69638 r69674 39 39 40 40 41 def cygpath(path, executive):42 """Converts a cygwin path to Windows path."""43 # FIXME: this may not be correct in every situation, but forking44 # cygpath is very slow. More importantly, there is a bug in Python45 # where launching subprocesses and communicating with PIPEs (which46 # is what run_command() does) can lead to deadlocks when running in47 # multiple threads.48 if path.startswith("/cygdrive"):49 path = path[10] + ":" + path[11:]50 path = path.replace("/", "\\")51 return path52 return executive.run_command(['cygpath', '-wa', path],53 decode_output=False).rstrip()54 55 56 41 def _escape(path): 57 42 """Handle any characters in the path that should be escaped.""" … … 68 53 return _winpath_to_uri(path) 69 54 if platform == 'cygwin': 70 return _winpath_to_uri( cygpath(path, executive))55 return _winpath_to_uri(_cygpath(path, executive)) 71 56 return _unixypath_to_uri(path) 72 57 … … 76 61 return "///" + path.replace("\\", "/") 77 62 63 64 def _cygpath(path, executive): 65 """Converts a cygwin path to Windows path.""" 66 return executive.run_command(['cygpath', '-wa', path], 67 decode_output=False).rstrip() 68 69 78 70 def _unixypath_to_uri(path): 79 71 """Converts a unix-style path to a file: URL.""" -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
r69638 r69674 84 84 options: command line options argument from optparse 85 85 proc: an active DumpRenderTree process 86 test_info: Object containing the test filename and timeout86 test_info: Object containing the test filename, uri and timeout 87 87 test_types: list of test types to subject the output to 88 88 test_args: arguments to be passed to each test … … 173 173 port: object implementing port-specific hooks 174 174 options: command line argument object from optparse 175 test_info: Object containing the test filename and timeout175 test_info: Object containing the test filename, uri and timeout 176 176 test_types: A list of TestType objects to run the test output 177 177 against. … … 194 194 # in coverage: see http://bitbucket.org/ned/coveragepy/issue/85. 195 195 test_info = self._test_info 196 uri = self._port.filename_to_uri(test_info.filename)197 196 self._driver = self._port.create_driver(self._test_args.png_path, 198 197 self._options) … … 200 199 start = time.time() 201 200 crash, timeout, actual_checksum, output, error = \ 202 self._driver.run_test( uri, test_info.timeout,201 self._driver.run_test(test_info.uri.strip(), test_info.timeout, 203 202 test_info.image_hash()) 204 203 end = time.time() … … 257 256 options: command line options argument from optparse 258 257 filename_list_queue: A thread safe Queue class that contains lists 259 of (filename, TestInfo) pairs.258 of tuples of (filename, uri) pairs. 260 259 result_queue: A thread safe Queue class that will contain tuples of 261 260 (test, failure lists) for the test results. … … 461 460 462 461 Args: 463 test_info: Object containing the test filename and timeout462 test_info: Object containing the test filename, uri and timeout 464 463 465 464 Returns: … … 509 508 510 509 Args: 511 test_info: Object containing the test filename and timeout510 test_info: Object containing the test filename, uri and timeout 512 511 513 512 Returns: … … 531 530 self._next_timeout = start + thread_timeout 532 531 533 uri = self._port.filename_to_uri(test_info.filename)534 532 crash, timeout, actual_checksum, output, error = \ 535 self._driver.run_test( uri, test_info.timeout, image_hash)533 self._driver.run_test(test_info.uri, test_info.timeout, image_hash) 536 534 end = time.time() 537 535 -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/base.py
r69638 r69674 50 50 from webkitpy.common.system import logutils 51 51 from webkitpy.common.system.executive import Executive, ScriptError 52 from webkitpy.common.system.path import abspath_to_uri53 52 from webkitpy.common.system.user import User 54 53 … … 314 313 return "%s://127.0.0.1:%u/%s" % (protocol, port, relative_path) 315 314 316 return abspath_to_uri(os.path.abspath(filename), self._executive) 315 abspath = os.path.abspath(filename) 316 317 # On Windows, absolute paths are of the form "c:\foo.txt". However, 318 # all current browsers (except for Opera) normalize file URLs by 319 # prepending an additional "/" as if the absolute path was 320 # "/c:/foo.txt". This means that all file URLs end up with "file:///" 321 # at the beginning. 322 if sys.platform == 'win32': 323 abspath = '/' + abspath.replace('\\', '/') 324 325 return "file://" + abspath 317 326 318 327 def tests(self, paths): … … 363 372 test = uri 364 373 if uri.startswith("file:///"): 365 # FIXME: need an inverse of uri_to_abspath()366 374 if sys.platform == 'win32': 367 375 test = test.replace('file:///', '') 368 376 test = test.replace('/', '\\') 369 elif sys.platform == 'cygwin':370 test = '/cygdrive/' + uri[8] + '/' + uri[11:]371 377 else: 372 378 test = test.replace('file://', '') -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/base_unittest.py
r69638 r69674 35 35 36 36 from webkitpy.common.system.executive import Executive, ScriptError 37 from webkitpy.common.system.path import abspath_to_uri38 37 from webkitpy.thirdparty.mock import Mock 39 38 … … 229 228 230 229 def test_filename_to_uri(self): 230 231 231 port = base.Port() 232 232 layout_test_dir = port.layout_tests_dir() 233 233 test_file = os.path.join(layout_test_dir, "foo", "bar.html") 234 235 # On Windows, absolute paths are of the form "c:\foo.txt". However, 236 # all current browsers (except for Opera) normalize file URLs by 237 # prepending an additional "/" as if the absolute path was 238 # "/c:/foo.txt". This means that all file URLs end up with "file:///" 239 # at the beginning. 240 if sys.platform == 'win32': 241 prefix = "file:///" 242 path = test_file.replace("\\", "/") 243 else: 244 prefix = "file://" 245 path = test_file 246 234 247 self.assertEqual(port.filename_to_uri(test_file), 235 abspath_to_uri(test_file, Executive()))248 prefix + path) 236 249 237 250 -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
r69638 r69674 44 44 import webbrowser 45 45 46 from webkitpy.common.system.executive import Executive47 from webkitpy.common.system.path import abspath_to_uri, cygpath48 from webkitpy.layout_tests.layout_package import test_expectations49 50 46 import base 51 47 import http_server 48 49 from webkitpy.common.system.executive import Executive 50 from webkitpy.layout_tests.layout_package import test_expectations 52 51 53 52 # Chromium DRT on OSX uses WebKitDriver. … … 145 144 file.write(actual_contents) 146 145 147 # We use convert_path if there's a chance that the launched148 # executable needs filename arguments in a different format than149 # the normal format provided by the python runtime. The main150 # example of this is running under Cygwin on Windows but151 # launching a Win32 binary, where we need to convert the path152 # from /cygdrive/c/foo.txt to c:\foo.txt.153 146 if diff_filename: 154 cmd = [executable, '--diff', 155 self._convert_path(expected_filename), 156 self._convert_path(actual_filename), 157 self._convert_path(diff_filename)] 147 cmd = [executable, '--diff', expected_filename, 148 actual_filename, diff_filename] 158 149 else: 159 cmd = [executable, 160 self._convert_path(expected_filename), 161 self._convert_path(actual_filename)] 150 cmd = [executable, expected_filename, actual_filename] 162 151 163 152 result = True … … 352 341 return self.path_from_webkit_base('LayoutTests', 'platform', platform) 353 342 354 def _convert_path(self, path):355 """Handles filename conversion for subprocess command line args."""356 # See note above in diff_image() for why we need this.357 if sys.platform == 'cygwin':358 return cygpath(path, self._executive)359 return path360 361 343 def _path_to_image_diff(self): 362 344 binary_name = 'image_diff' … … 378 360 driver_args = [] 379 361 if self._image_path: 380 # See note above in diff_image() for why we need 381 # _convert_path(). 382 driver_args.append("--pixel-tests=" + 383 self._port._convert_path(self._image_path)) 362 driver_args.append("--pixel-tests=" + self._image_path) 384 363 385 364 if self._options.use_drt: -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
r69638 r69674 92 92 93 93 def __init__(self, port, filename, timeout): 94 """ 94 """Generates the URI and stores the filename and timeout for this test. 95 95 Args: 96 96 filename: Full path to the test. 97 timeout: Timeout for running the test in DRT.97 timeout: Timeout for running the test in TestShell. 98 98 """ 99 99 self.filename = filename 100 100 self._port = port 101 self.uri = port.filename_to_uri(filename) 101 102 self.timeout = timeout 102 103 self._image_checksum = -1
Note: See TracChangeset
for help on using the changeset viewer.