Remove requires_http_server as Chromium Android was the only port that needed this
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 May 2013 07:32:33 +0000 (07:32 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 May 2013 07:32:33 +0000 (07:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=117018

Reviewed by Benjamin Poulain.

Removed the unused code that existed for Chromium Android port.

* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner.run_tests):
(LayoutTestRunner._handle_finished_test_list):
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._run_tests):
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner._collect_tests):
(PerfTestsRunner.run):
* Scripts/webkitpy/port/base.py:
(Port.to.start_helper):
* Scripts/webkitpy/port/base_unittest.py:
(PortTest.test_build_path):

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

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py
Tools/Scripts/webkitpy/port/base.py
Tools/Scripts/webkitpy/port/base_unittest.py

index 41fa4c6..41e9339 100644 (file)
@@ -1,3 +1,25 @@
+2013-05-30  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Remove requires_http_server as Chromium Android was the only port that needed this
+        https://bugs.webkit.org/show_bug.cgi?id=117018
+
+        Reviewed by Benjamin Poulain.
+
+        Removed the unused code that existed for Chromium Android port.
+
+        * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
+        (LayoutTestRunner.run_tests):
+        (LayoutTestRunner._handle_finished_test_list):
+        * Scripts/webkitpy/layout_tests/controllers/manager.py:
+        (Manager._run_tests):
+        * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+        (PerfTestsRunner._collect_tests):
+        (PerfTestsRunner.run):
+        * Scripts/webkitpy/port/base.py:
+        (Port.to.start_helper):
+        * Scripts/webkitpy/port/base_unittest.py:
+        (PortTest.test_build_path):
+
 2013-05-29  Ruth Fong  <ruth_fong@apple.com>
 
         prepare-Changelog should not be generating namespace-only or class-name-only lines like "(WebCore):"
index 6ee6655..371b2fb 100644 (file)
@@ -116,7 +116,7 @@ class LayoutTestRunner(object):
 
         all_shards = locked_shards + unlocked_shards
         self._remaining_locked_shards = locked_shards
-        if self._port.requires_http_server() or (locked_shards and self._options.http):
+        if locked_shards and self._options.http:
             self.start_servers_with_lock(2 * min(num_workers, len(locked_shards)))
 
         num_workers = min(num_workers, len(all_shards))
@@ -239,7 +239,7 @@ class LayoutTestRunner(object):
         index = find(list_name, self._remaining_locked_shards)
         if index >= 0:
             self._remaining_locked_shards.pop(index)
-            if not self._remaining_locked_shards and not self._port.requires_http_server():
+            if not self._remaining_locked_shards:
                 self.stop_servers_with_lock()
 
     def _handle_finished_test(self, worker_name, result, log_messages=[]):
index 5ef2882..28a8930 100644 (file)
@@ -241,7 +241,7 @@ class Manager(object):
                                            summarized_results, initial_results, retry_results, enabled_pixel_tests_in_retry)
 
     def _run_tests(self, tests_to_run, tests_to_skip, repeat_each, iterations, num_workers, retrying):
-        needs_http = self._port.requires_http_server() or any(self._is_http_test(test) for test in tests_to_run)
+        needs_http = any(self._is_http_test(test) for test in tests_to_run)
         needs_websockets = any(self._is_websocket_test(test) for test in tests_to_run)
 
         test_inputs = []
index 1877d02..adfabff 100644 (file)
@@ -165,18 +165,8 @@ class PerfTestsRunner(object):
 
         return tests
 
-    def _start_http_servers(self):
-        self._port.acquire_http_lock()
-        self._port.start_http_server(number_of_servers=2)
-
-    def _stop_http_servers(self):
-        self._port.stop_http_server()
-        self._port.release_http_lock()
-
     def run(self):
-        needs_http = self._port.requires_http_server()
-
-        if not self._port.check_build(needs_http=needs_http):
+        if not self._port.check_build(needs_http=False):
             _log.error("Build not up to date for %s" % self._port._path_to_driver())
             return self.EXIT_CODE_BAD_BUILD
 
@@ -193,14 +183,7 @@ class PerfTestsRunner(object):
                 if not test.prepare(self._options.time_out_ms):
                     return self.EXIT_CODE_BAD_PREPARATION
 
-            try:
-                if needs_http:
-                    self._start_http_servers()
-                unexpected = self._run_tests_set(sorted(list(tests), key=lambda test: test.test_name()))
-
-            finally:
-                if needs_http:
-                    self._stop_http_servers()
+            unexpected = self._run_tests_set(sorted(list(tests), key=lambda test: test.test_name()))
 
             if self._options.generate_results and not self._options.profile:
                 exit_code = self._generate_results()
index cb07e2a..999dc0a 100644 (file)
@@ -928,11 +928,6 @@ class Port(object):
         method."""
         pass
 
-    def requires_http_server(self):
-        """Does the port require an HTTP server for running tests? This could
-        be the case when the tests aren't run on the host platform."""
-        return False
-
     def start_http_server(self, additional_dirs=None, number_of_servers=None):
         """Start a web server. Raise an error if it can't start or is already running.
 
index 1e81859..c04cae0 100644 (file)
@@ -463,10 +463,6 @@ class PortTest(unittest.TestCase):
         port = self.make_port(options=optparse.Values({'build_directory': '/my-build-directory/'}))
         self.assertEqual(port._build_path(), '/my-build-directory/Release')
 
-    def test_dont_require_http_server(self):
-        port = self.make_port()
-        self.assertEqual(port.requires_http_server(), False)
-
 
 class NaturalCompareTest(unittest.TestCase):
     def setUp(self):