2011-01-28 Tony Chang <tony@chromium.org>
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Feb 2011 21:23:27 +0000 (21:23 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Feb 2011 21:23:27 +0000 (21:23 +0000)
        Reviewed by Eric Seidel.

        [chromium] remove --use-test-shell from NRWT
        https://bugs.webkit.org/show_bug.cgi?id=53346

        I've already started removing some of the bindings like eventSender so
        this already doesn't work isn't useful.  Also updated some comments to
        refer to DRT instead of test_shell.

        * Scripts/webkitpy/layout_tests/layout_package/test_expectations.py:
        * Scripts/webkitpy/layout_tests/port/chromium.py:
        * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
        * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
        * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
        * Scripts/webkitpy/layout_tests/port/chromium_win.py:
        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
        * Scripts/webkitpy/layout_tests/test_types/text_diff.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@77410 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/port/chromium.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py
Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
Tools/Scripts/webkitpy/layout_tests/test_types/text_diff.py

index 53db646c0dbaf6f6727ed5edf98820a171f525a3..d09e07a704d4ecbdccb387c764319bc655afe65e 100644 (file)
@@ -1,3 +1,23 @@
+2011-01-28  Tony Chang  <tony@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        [chromium] remove --use-test-shell from NRWT
+        https://bugs.webkit.org/show_bug.cgi?id=53346
+
+        I've already started removing some of the bindings like eventSender so
+        this already doesn't work isn't useful.  Also updated some comments to
+        refer to DRT instead of test_shell.
+
+        * Scripts/webkitpy/layout_tests/layout_package/test_expectations.py:
+        * Scripts/webkitpy/layout_tests/port/chromium.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_win.py:
+        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+        * Scripts/webkitpy/layout_tests/test_types/text_diff.py:
+
 2011-02-02  Steve Lacey  <sjl@chromium.org>
 
         Reviewed by Eric Carlson.
index 3608203dcfff1fde4316d40b105381ba7cf2786b..02601a38ae2f253c425fcd229fe67580d872a73f 100644 (file)
@@ -171,8 +171,6 @@ class ChromiumPort(base.Port):
         return result
 
     def driver_name(self):
-        if self._options.use_test_shell:
-            return "test_shell"
         return "DumpRenderTree"
 
     def path_from_chromium_base(self, *comps):
@@ -329,13 +327,11 @@ class ChromiumPort(base.Port):
 
     def _path_to_image_diff(self):
         binary_name = 'ImageDiff'
-        if self.get_option('use_test_shell'):
-            binary_name = 'image_diff'
         return self._build_path(self.get_option('configuration'), binary_name)
 
 
 class ChromiumDriver(base.Driver):
-    """Abstract interface for test_shell."""
+    """Abstract interface for DRT."""
 
     def __init__(self, port, worker_number):
         self._port = port
@@ -354,10 +350,7 @@ class ChromiumDriver(base.Driver):
             cmd.append("--pixel-tests=" +
                        self._port._convert_path(self._image_path))
 
-        if self._port.get_option('use_test_shell'):
-            cmd.append('--layout-tests')
-        else:
-            cmd.append('--test-shell')
+        cmd.append('--test-shell')
 
         if self._port.get_option('startup_dialog'):
             cmd.append('--testshell-startup-dialog')
@@ -374,14 +367,12 @@ class ChromiumDriver(base.Driver):
         if self._port.get_option('stress_deopt'):
             cmd.append('--stress-deopt')
 
-        # test_shell does not support accelerated compositing.
-        if not self._port.get_option("use_test_shell"):
-            if self._port.get_option('accelerated_compositing'):
-                cmd.append('--enable-accelerated-compositing')
-            if self._port.get_option('accelerated_2d_canvas'):
-                cmd.append('--enable-accelerated-2d-canvas')
-            if self._port.get_option('enable_hardware_gpu'):
-                cmd.append('--enable-hardware-gpu')
+        if self._port.get_option('accelerated_compositing'):
+            cmd.append('--enable-accelerated-compositing')
+        if self._port.get_option('accelerated_2d_canvas'):
+            cmd.append('--enable-accelerated-2d-canvas')
+        if self._port.get_option('enable_hardware_gpu'):
+            cmd.append('--enable-hardware-gpu')
         return cmd
 
     def start(self):
@@ -409,17 +400,17 @@ class ChromiumDriver(base.Driver):
         try:
             if input:
                 if isinstance(input, unicode):
-                    # TestShell expects utf-8
+                    # DRT expects utf-8
                     input = input.encode("utf-8")
                 self._proc.stdin.write(input)
             # DumpRenderTree text output is always UTF-8.  However some tests
             # (e.g. webarchive) may spit out binary data instead of text so we
-            # don't bother to decode the output (for either DRT or test_shell).
+            # don't bother to decode the output.
             line = self._proc.stdout.readline()
             # We could assert() here that line correctly decodes as UTF-8.
             return (line, False)
         except IOError, e:
-            _log.error("IOError communicating w/ test_shell: " + str(e))
+            _log.error("IOError communicating w/ DRT: " + str(e))
             return (None, True)
 
     def _test_shell_command(self, uri, timeoutms, checksum):
@@ -474,7 +465,7 @@ class ChromiumDriver(base.Driver):
             if line == '' and self.poll() is not None:
                 # This is hex code 0xc000001d, which is used for abrupt
                 # termination. This happens if we hit ctrl+c from the prompt
-                # and we happen to be waiting on test_shell.
+                # and we happen to be waiting on DRT.
                 # sdoyon: Not sure for which OS and in what circumstances the
                 # above code is valid. What works for me under Linux to detect
                 # ctrl+c is for the subprocess returncode to be negative
@@ -521,8 +512,8 @@ class ChromiumDriver(base.Driver):
             if sys.platform not in ('win32', 'cygwin'):
                 # Closing stdin/stdout/stderr hangs sometimes on OS X,
                 # (see __init__(), above), and anyway we don't want to hang
-                # the harness if test_shell is buggy, so we wait a couple
-                # seconds to give test_shell a chance to clean up, but then
+                # the harness if DRT is buggy, so we wait a couple
+                # seconds to give DRT a chance to clean up, but then
                 # force-kill the process if necessary.
                 KILL_TIMEOUT = 3.0
                 timeout = time.time() + KILL_TIMEOUT
index c1c85f8985ef8b795042dbd1811f31681af2a890..c3c5a21f9b8664370413aff54d611ee88d5b53be 100644 (file)
@@ -85,7 +85,7 @@ class ChromiumLinuxPort(chromium.ChromiumPort):
         base = self.path_from_chromium_base()
         if self._filesystem.exists(self._filesystem.join(base, 'sconsbuild')):
             return self._filesystem.join(base, 'sconsbuild', *comps)
-        if self._filesystem.exists(self._filesystem.join(base, 'out', *comps)) or self.get_option('use_test_shell'):
+        if self._filesystem.exists(self._filesystem.join(base, 'out', *comps)):
             return self._filesystem.join(base, 'out', *comps)
         base = self.path_from_webkit_base()
         if self._filesystem.exists(self._filesystem.join(base, 'sconsbuild')):
@@ -153,8 +153,6 @@ class ChromiumLinuxPort(chromium.ChromiumPort):
         if not configuration:
             configuration = self.get_option('configuration')
         binary_name = 'DumpRenderTree'
-        if self.get_option('use_test_shell'):
-            binary_name = 'test_shell'
         return self._build_path(configuration, binary_name)
 
     def _path_to_helper(self):
index f7aeed5ba5191e1f95f05030bda91edeb297ddef..17862a257718399134337685f1c43d996f3abaab 100644 (file)
@@ -81,9 +81,6 @@ class ChromiumMacPort(chromium.ChromiumPort):
         return chromium.ChromiumPort.default_child_processes(self)
 
     def driver_name(self):
-        """name for this port's equivalent of DumpRenderTree."""
-        if self.get_option('use_test_shell'):
-            return "TestShell"
         return "DumpRenderTree"
 
     def test_platform_name(self):
@@ -113,7 +110,7 @@ class ChromiumMacPort(chromium.ChromiumPort):
                                          *comps)
 
         path = self.path_from_chromium_base('xcodebuild', *comps)
-        if self._filesystem.exists(path) or self.get_option('use_test_shell'):
+        if self._filesystem.exists(path):
             return path
         return self.path_from_webkit_base(
             'Source', 'WebKit', 'chromium', 'xcodebuild', *comps)
@@ -157,8 +154,6 @@ class ChromiumMacPort(chromium.ChromiumPort):
 
     def _path_to_helper(self):
         binary_name = 'LayoutTestHelper'
-        if self.get_option('use_test_shell'):
-            binary_name = 'layout_test_helper'
         return self._build_path(self.get_option('configuration'), binary_name)
 
     def _path_to_wdiff(self):
index 6c8987b913501bc9338c6c65e27eec4d1c40018b..b89c8cc31e126c175f604b2d1020114b0fcbde7a 100644 (file)
@@ -116,13 +116,6 @@ class ChromiumPortTest(unittest.TestCase):
         port = ChromiumPortTest.TestMacPort(options=mock_options)
         self.assertTrue(port._path_to_image_diff().endswith(
             '/xcodebuild/default/ImageDiff'))
-        mock_options = mocktool.MockOptions(use_test_shell=True)
-        port = ChromiumPortTest.TestLinuxPort(options=mock_options)
-        self.assertTrue(port._path_to_image_diff().endswith(
-            '/out/default/image_diff'), msg=port._path_to_image_diff())
-        port = ChromiumPortTest.TestMacPort(options=mock_options)
-        self.assertTrue(port._path_to_image_diff().endswith(
-            '/xcodebuild/default/image_diff'))
         # FIXME: Figure out how this is going to work on Windows.
         #port = chromium_win.ChromiumWinPort('test-port', options=MockOptions())
 
index 14f277791d99bd82c2c6e946ec18b28b14ae9960..091b273f933bd6f5f325e18edc59b03c525f20ed 100644 (file)
@@ -113,7 +113,7 @@ class ChromiumWinPort(chromium.ChromiumPort):
         if self._filesystem.exists(p):
             return p
         p = self.path_from_chromium_base('chrome', *comps)
-        if self._filesystem.exists(p) or self.get_option('use_test_shell'):
+        if self._filesystem.exists(p):
             return p
         return self._filesystem.join(self.path_from_webkit_base(), 'WebKit', 'chromium', *comps)
 
@@ -141,20 +141,14 @@ class ChromiumWinPort(chromium.ChromiumPort):
         if not configuration:
             configuration = self.get_option('configuration')
         binary_name = 'DumpRenderTree.exe'
-        if self.get_option('use_test_shell'):
-            binary_name = 'test_shell.exe'
         return self._build_path(configuration, binary_name)
 
     def _path_to_helper(self):
         binary_name = 'LayoutTestHelper.exe'
-        if self.get_option('use_test_shell'):
-            binary_name = 'layout_test_helper.exe'
         return self._build_path(self.get_option('configuration'), binary_name)
 
     def _path_to_image_diff(self):
         binary_name = 'ImageDiff.exe'
-        if self.get_option('use_test_shell'):
-            binary_name = 'image_diff.exe'
         return self._build_path(self.get_option('configuration'), binary_name)
 
     def _path_to_wdiff(self):
index 1971d54622c5c986f2260438697cffc6b926eb69..147d94a851999d1186acb61f5e32141e013df7de 100755 (executable)
@@ -232,9 +232,6 @@ def parse_args(args=None):
         optparse.make_option("--nocheck-sys-deps", action="store_true",
             default=False,
             help="Don't check the system dependencies (themes)"),
-        optparse.make_option("--use-test-shell", action="store_true",
-            default=False,
-            help="Use test_shell instead of DRT"),
         optparse.make_option("--accelerated-compositing",
             action="store_true",
             help="Use hardware-accelated compositing for rendering"),
index 7b7febe05bb7130c2a17c99bae0ffcd6d8439a96..6debcb7a89f75b746d54ba6876475854b493ec6e 100644 (file)
@@ -61,9 +61,9 @@ class TestTextDiff(test_type_base.TestTypeBase):
 
         # If we're generating a new baseline, we pass.
         if test_args.new_baseline or test_args.reset_results:
-            # Although all test_shell/DumpRenderTree output should be utf-8,
-            # we do not ever decode it inside run-webkit-tests.  For some tests
-            # DumpRenderTree may not output utf-8 text (e.g. webarchives).
+            # Although all DumpRenderTree output should be utf-8, we do not
+            # ever decode it inside run-webkit-tests.  For some tests
+            # DumpRenderTree may not output utf-8 text (e.g.  webarchives).
             self._save_baseline_data(filename, actual_test_output.text,
                                      ".txt", encoding=None,
                                      generate_new_baseline=test_args.new_baseline)