Title: [90503] trunk/Tools
Revision
90503
Author
dpra...@chromium.org
Date
2011-07-06 14:46:17 -0700 (Wed, 06 Jul 2011)

Log Message

2011-06-24  Dirk Pranke  <dpra...@chromium.org>

        Reviewed by Adam Barth.

        nrwt: remove --use-apache from the command line
        https://bugs.webkit.org/show_bug.cgi?id=63358

        This change removes the --use-apache command line argument. It
        was initially put in when we were trying to get the cygwin
        apache instance to work with Chromium win, but that code has
        bitrotted and doesn't work at all now.

        Arguably we should remove all of the code to allow for a choice
        of web servers, but since we may still want to switch off of
        LigHTTPd at some point on Windows, I'll leave the rest in for
        now (or at least yank it in a different change.)

        * Scripts/webkitpy/layout_tests/port/base.py:
        * Scripts/webkitpy/layout_tests/port/chromium.py:
        * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
        * Scripts/webkitpy/layout_tests/port/chromium_win.py:
        * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (90502 => 90503)


--- trunk/Tools/ChangeLog	2011-07-06 21:40:11 UTC (rev 90502)
+++ trunk/Tools/ChangeLog	2011-07-06 21:46:17 UTC (rev 90503)
@@ -1,3 +1,27 @@
+2011-06-24  Dirk Pranke  <dpra...@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        nrwt: remove --use-apache from the command line
+        https://bugs.webkit.org/show_bug.cgi?id=63358
+
+        This change removes the --use-apache command line argument. It
+        was initially put in when we were trying to get the cygwin
+        apache instance to work with Chromium win, but that code has
+        bitrotted and doesn't work at all now.
+
+        Arguably we should remove all of the code to allow for a choice
+        of web servers, but since we may still want to switch off of
+        LigHTTPd at some point on Windows, I'll leave the rest in for
+        now (or at least yank it in a different change.)
+
+        * Scripts/webkitpy/layout_tests/port/base.py:
+        * Scripts/webkitpy/layout_tests/port/chromium.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_win.py:
+        * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
+        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+
 2011-07-06  Dimitri Glazkov  <dglaz...@chromium.org>
 
         garden-o-matic should use a favicon to indicate current state.

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (90502 => 90503)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py	2011-07-06 21:40:11 UTC (rev 90502)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py	2011-07-06 21:46:17 UTC (rev 90503)
@@ -136,7 +136,6 @@
         self._test_configuration = None
         self._multiprocessing_is_available = (multiprocessing is not None)
         self._results_directory = None
-        self.set_option_default('use_apache', self._default_to_apache())
 
     def executive(self):
         return self._executive
@@ -223,7 +222,7 @@
         return True
 
     def check_httpd(self):
-        if self.get_option('use_apache'):
+        if self._uses_apache():
             path = self._path_to_apache()
         else:
             path = self._path_to_lighttpd()
@@ -646,7 +645,7 @@
         Ports can stub this out if they don't need a web server to be running."""
         assert not self._http_server, 'Already running an http server.'
 
-        if self.get_option('use_apache'):
+        if self._uses_apache():
             server = apache_http_server.LayoutTestApacheHttpd(self, self.results_directory())
         else:
             server = http_server.Lighttpd(self, self.results_directory())
@@ -835,10 +834,7 @@
     def _webkit_build_directory(self, args):
         return self._config.build_directory(args[0])
 
-    def _default_to_apache(self):
-        """Override if the port should use LigHTTPd instead of Apache by default.
-
-        Ports that override start_http_server() ignore this method."""
+    def _uses_apache(self):
         return True
 
     def _path_to_apache(self):

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py (90502 => 90503)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py	2011-07-06 21:40:11 UTC (rev 90502)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py	2011-07-06 21:46:17 UTC (rev 90503)
@@ -117,6 +117,8 @@
         return result
 
     def check_sys_deps(self, needs_http):
+        result = super(ChromiumPort, self).check_sys_deps(needs_http)
+
         cmd = [self._path_to_driver(), '--check-layout-test-sys-deps']
 
         local_error = executive.ScriptError()
@@ -131,7 +133,7 @@
             _log.error('')
             _log.error(output)
             return False
-        return True
+        return result
 
     def check_image_diff(self, override_step=None, logging=True):
         image_diff_path = self._path_to_image_diff()

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py (90502 => 90503)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py	2011-07-06 21:40:11 UTC (rev 90502)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py	2011-07-06 21:46:17 UTC (rev 90503)
@@ -94,11 +94,6 @@
 
     def check_build(self, needs_http):
         result = chromium.ChromiumPort.check_build(self, needs_http)
-        if needs_http:
-            if self.get_option('use_apache'):
-                result = self._check_apache_install() and result
-            else:
-                result = self._check_lighttpd_install() and result
         result = self.check_wdiff() and result
 
         if not result:

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py (90502 => 90503)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py	2011-07-06 21:40:11 UTC (rev 90502)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py	2011-07-06 21:46:17 UTC (rev 90503)
@@ -55,6 +55,7 @@
 
 class ChromiumWinPort(chromium.ChromiumPort):
     """Chromium Win implementation of the Port class."""
+
     # FIXME: Figure out how to unify this with base.TestConfiguration.all_systems()?
     SUPPORTED_VERSIONS = ('xp', 'vista', 'win7')
 
@@ -129,7 +130,7 @@
             return p
         return self._filesystem.join(self.path_from_webkit_base(), 'Source', 'WebKit', 'chromium', *comps)
 
-    def _default_to_apache(self):
+    def _uses_apache(self):
         return False
 
     def _lighttpd_path(self, *comps):

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py (90502 => 90503)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py	2011-07-06 21:40:11 UTC (rev 90502)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py	2011-07-06 21:46:17 UTC (rev 90503)
@@ -58,6 +58,13 @@
     def _mock_path_from_chromium_base(self, *comps):
         return self._port._filesystem.join("/chromium/src", *comps)
 
+    def test_uses_apache(self):
+        port = self.make_port()
+        if not port:
+            return
+
+        self.assertFalse(port._uses_apache())
+
     def test_setup_environ_for_server(self):
         port = self.make_port()
         if not port:

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py (90502 => 90503)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py	2011-07-06 21:40:11 UTC (rev 90502)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py	2011-07-06 21:46:17 UTC (rev 90503)
@@ -40,8 +40,7 @@
 from webkitpy.layout_tests.port import test
 
 from webkitpy.tool import mocktool
-mock_options = mocktool.MockOptions(use_apache=True,
-                                    configuration='Release')
+mock_options = mocktool.MockOptions(configuration='Release')
 
 
 class MockDRTPortTest(port_testcase.PortTestCase):

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py (90502 => 90503)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py	2011-07-06 21:40:11 UTC (rev 90502)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py	2011-07-06 21:46:17 UTC (rev 90503)
@@ -89,6 +89,13 @@
         self.assertTrue('--foo=bar' in cmd_line)
         self.assertTrue('--foo=baz' in cmd_line)
 
+    def test_uses_apache(self):
+        port = self.make_port()
+        if not port:
+            return
+
+        self.assertTrue(port._uses_apache())
+
     def assert_servers_are_down(self, host, ports):
         for port in ports:
             try:

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (90502 => 90503)


--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py	2011-07-06 21:40:11 UTC (rev 90502)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py	2011-07-06 21:46:17 UTC (rev 90503)
@@ -149,9 +149,6 @@
     if options.pixel_tests is None:
         options.pixel_tests = True
 
-    if not options.use_apache:
-        options.use_apache = sys.platform.startswith('linux') or sys.platform == 'darwin'
-
     if not options.time_out_ms:
         if options.configuration == "Debug":
             options.time_out_ms = str(2 * manager.Manager.DEFAULT_TEST_TIMEOUT_MS)
@@ -377,8 +374,6 @@
         # instead of --force:
         optparse.make_option("--force", action="" default=False,
             help="Run all tests, even those marked SKIP in the test list"),
-        optparse.make_option("--use-apache", action=""
-            default=False, help="Whether to use apache instead of lighttpd."),
         optparse.make_option("--time-out-ms",
             help="Set the timeout for each test"),
         # old-run-webkit-tests calls --randomize-order --random:
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to