Changeset 115490 in webkit
- Timestamp:
- Apr 27, 2012 2:03:29 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r115488 r115490 1 2012-04-27 Dirk Pranke <dpranke@chromium.org> 2 3 [chromium] use "drt-style" output, not "test-shell-style" output, on mac and linux DRT 4 https://bugs.webkit.org/show_bug.cgi?id=84917 5 6 Unreviewed, build fix. 7 8 Reland the change in r115453 with a fix for chromium win. 9 10 * platform/chromium/test_expectations.txt: 11 1 12 2012-04-27 Eric Carlson <eric.carlson@apple.com> 2 13 -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r115481 r115490 3697 3697 BUGWK85082 XP DEBUG : platform/chromium/media/video-capture-preview.html = CRASH PASS 3698 3698 3699 // This appears to be sensitive to --test-shell vs "drt mode" in DRT for some reason 3700 BUGWK85085 MAC LINUX : svg/custom/clip-path-referencing-use2.svg = TEXT 3701 3699 3702 BUGWK85090 : fast/js/dfg-float64array.html = PASS TIMEOUT 3700 3703 BUGWK85090 : fast/js/dfg-uint16array.html = PASS TIMEOUT -
trunk/Tools/ChangeLog
r115489 r115490 1 2012-04-27 Dirk Pranke <dpranke@chromium.org> 2 3 [chromium] use "drt-style" output, not "test-shell-style" output, on mac and linux DRT 4 https://bugs.webkit.org/show_bug.cgi?id=84917 5 6 Unreviewed, build fix. 7 8 Reland the change in r115453 with a fix for chromium win. 9 The logic in ChromiumDriver was busted on windows, causing DRT 10 to get launched without the --test-shell flag. 11 12 * Scripts/webkitpy/layout_tests/port/chromium.py: 13 (ChromiumDriver): 14 (ChromiumDriver.__init__): 15 (ChromiumDriver._wrapper_options): 16 (ChromiumDriver.cmd_line): 17 (ChromiumDriver._start): 18 (ChromiumDriver.has_crashed): 19 (ChromiumDriver.run_test): 20 (ChromiumDriver.stop): 21 * Scripts/webkitpy/layout_tests/port/chromium_unittest.py: 22 (ChromiumDriverTest.setUp): 23 (ChromiumDriverTest.test_stop): 24 (ChromiumDriverTest.test_two_drivers.MockDriver.__init__): 25 (ChromiumDriverTest.test_two_drivers): 26 1 27 2012-04-27 Peter Beverloo <peter@chromium.org> 2 28 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
r115469 r115490 47 47 from webkitpy.layout_tests.models.test_configuration import TestConfiguration 48 48 from webkitpy.layout_tests.port.base import Port, VirtualTestSuite 49 from webkitpy.layout_tests.port.driver import Driver, DriverOutput 49 from webkitpy.layout_tests.port.driver import DriverOutput 50 from webkitpy.layout_tests.port.webkit import WebKitDriver 50 51 from webkitpy.layout_tests.port import builders 51 52 from webkitpy.layout_tests.servers import http_server … … 404 405 405 406 406 # FIXME: This should inherit from WebKitDriver now that Chromium has a DumpRenderTree process like the rest of WebKit. 407 class ChromiumDriver(Driver): 407 class ChromiumDriver(WebKitDriver): 408 KILL_TIMEOUT_DEFAULT = 3.0 409 408 410 def __init__(self, port, worker_number, pixel_tests, no_timeout=False): 409 Driver.__init__(self, port, worker_number, pixel_tests, no_timeout)411 WebKitDriver.__init__(self, port, worker_number, pixel_tests, no_timeout) 410 412 self._proc = None 411 413 self._image_path = None 414 415 # FIXME: Make the regular webkit driver work on win as well so we can delete all of this driver code. 416 if port.host.platform.is_win(): 417 if not hasattr(port._options, 'additional_drt_flag'): 418 port._options.additional_drt_flag = [] 419 if not '--test-shell' in port._options.additional_drt_flag: 420 port._options.additional_drt_flag.append('--test-shell') 421 422 self._test_shell = '--test-shell' in port.get_option('additional_drt_flag', []) 412 423 413 424 def _wrapper_options(self, pixel_tests): 414 425 cmd = [] 415 426 if pixel_tests: 416 if not self._image_path: 417 self._image_path = self._port._filesystem.join(self._port.results_directory(), 'png_result%s.png' % self._worker_number) 418 # See note above in diff_image() for why we need _convert_path(). 419 cmd.append("--pixel-tests=" + self._port._convert_path(self._image_path)) 427 if self._test_shell: 428 if not self._image_path: 429 self._image_path = self._port._filesystem.join(self._port.results_directory(), 'png_result%s.png' % self._worker_number) 430 # See note above in diff_image() for why we need _convert_path(). 431 cmd.append("--pixel-tests=" + self._port._convert_path(self._image_path)) 432 else: 433 cmd.append('--pixel-tests') 434 420 435 # FIXME: This is not None shouldn't be necessary, unless --js-flags="''" changes behavior somehow? 421 436 if self._port.get_option('js_flags') is not None: … … 451 466 cmd = self._command_wrapper(self._port.get_option('wrapper')) 452 467 cmd.append(self._port._path_to_driver()) 453 # FIXME: Why does --test-shell exist? TestShell is dead, shouldn't this be removed?454 # It seems it's still in use in Tools/DumpRenderTree/chromium/DumpRenderTree.cpp as of 8/10/11.455 cmd.append('--test-shell')456 468 cmd.extend(self._wrapper_options(pixel_tests)) 457 469 cmd.extend(per_test_args) 458 470 471 if not self._test_shell: 472 cmd.append('-') 473 459 474 return cmd 460 475 461 476 def _start(self, pixel_tests, per_test_args): 477 if not self._test_shell: 478 return super(ChromiumDriver, self)._start(pixel_tests, per_test_args) 479 462 480 assert not self._proc 463 481 # FIXME: This should use ServerProcess like WebKitDriver does. … … 467 485 468 486 def has_crashed(self): 487 if not self._test_shell: 488 return super(ChromiumDriver, self).has_crashed() 489 469 490 if self._proc is None: 470 491 return False … … 524 545 525 546 def run_test(self, driver_input): 547 if not self._test_shell: 548 return super(ChromiumDriver, self).run_test(driver_input) 549 526 550 if not self._proc: 527 551 self._start(driver_input.should_run_pixel_test, driver_input.args) … … 625 649 626 650 def stop(self): 651 if not self._test_shell: 652 return super(ChromiumDriver, self).stop() 653 627 654 if not self._proc: 628 655 return 629 # FIXME: If we used ServerProcess all this would happen for free with ServerProces.stop()630 656 self._proc.stdin.close() 631 657 self._proc.stdout.close() … … 635 661 if time_out_ms and not self._no_timeout: 636 662 timeout_ratio = float(time_out_ms) / self._port.default_test_timeout_ms() 637 kill_timeout_seconds = 3.0 * timeout_ratio if timeout_ratio > 1.0 else 3.0663 kill_timeout_seconds = self.KILL_TIMEOUT_DEFAULT * timeout_ratio if timeout_ratio > 1.0 else self.KILL_TIMEOUT_DEFAULT 638 664 else: 639 kill_timeout_seconds = 3.0665 kill_timeout_seconds = self.KILL_TIMEOUT_DEFAULT 640 666 641 667 # Closing stdin/stdout/stderr hangs sometimes on OS X, -
trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py
r115469 r115490 36 36 from webkitpy.common.system.filesystem_mock import MockFileSystem 37 37 from webkitpy.common.system.systemhost_mock import MockSystemHost 38 from webkitpy.layout_tests.port.config_mock import MockConfig 38 39 from webkitpy.thirdparty.mock import Mock 39 40 from webkitpy.tool.mocktool import MockOptions … … 52 53 class ChromiumDriverTest(unittest.TestCase): 53 54 def setUp(self): 54 mock_port = Mock() # FIXME: This should use a tighter mock. 55 mock_port.default_test_timeout_ms = lambda: 1000 56 self.driver = chromium.ChromiumDriver(mock_port, worker_number=0, pixel_tests=True) 55 host = MockSystemHost() 56 options = MockOptions(configuration='Release', additional_drt_flag=['--test-shell']) 57 config = MockConfig(filesystem=host.filesystem, default_configuration='Release') 58 self.port = chromium_mac.ChromiumMacPort(host, 'chromium-mac-snowleopard', options=options, config=config) 59 self.driver = chromium.ChromiumDriver(self.port, worker_number=0, pixel_tests=True) 57 60 58 61 def test_test_shell_command(self): … … 133 136 134 137 self.driver._port._executive = FakeExecutive() 135 # Override the kill timeout (ms) so the test runs faster. 136 self.driver._port.get_option = lambda name: 1 138 self.driver.KILL_TIMEOUT_DEFAULT = 0.01 137 139 self.driver.stop() 138 140 self.assertTrue(self.wait_called) … … 140 142 141 143 def test_two_drivers(self): 142 mock_port = Mock()143 144 144 145 class MockDriver(chromium.ChromiumDriver): 145 def __init__(self ):146 chromium.ChromiumDriver.__init__(self, mock_port, worker_number=0, pixel_tests=False)146 def __init__(self, port): 147 chromium.ChromiumDriver.__init__(self, port, worker_number=0, pixel_tests=False) 147 148 148 149 def cmd_line(self, pixel_test, per_test_args): … … 150 151 151 152 # get_option is used to get the timeout (ms) for a process before we kill it. 152 mock_port.get_option = lambda name: 60 * 1000 153 mock_port.default_test_timeout_ms = lambda: 1000 154 driver1 = MockDriver() 153 driver1 = MockDriver(self.port) 155 154 driver1._start(False, []) 156 driver2 = MockDriver( )155 driver2 = MockDriver(self.port) 157 156 driver2._start(False, []) 158 157 # It's possible for driver1 to timeout when stopping if it's sharing stdin with driver2.
Note: See TracChangeset
for help on using the changeset viewer.