Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2389)

Unified Diff: Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py

Issue 150573014: Rename various methods in webkitpy.layout_test.Port to be public (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove port.check_httpd stub call from port_testcase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py b/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py
index e00a9a0cb449621a3de48b68f0cd8ed625da83e9..943e93203c586962594e6607eff9b7d450c242d8 100644
--- a/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py
+++ b/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py
@@ -68,11 +68,10 @@ class LayoutTestApacheHttpd(http_server_base.HttpServerBase):
error_log = self._filesystem.join(output_dir, "error_log.txt")
document_root = self._filesystem.join(test_dir, "http", "tests")
- # FIXME: We shouldn't be calling a protected method of _port_obj!
- executable = self._port_obj._path_to_apache()
+ executable = self._port_obj.path_to_apache()
start_cmd = [executable,
- '-f', "\"%s\"" % self._get_apache_config_file_path(test_dir, output_dir),
+ '-f', "\"%s\"" % self._port_obj.path_to_apache_config_file(),
'-C', "\'DocumentRoot \"%s\"\'" % document_root,
'-c', "\'Alias /js-test-resources \"%s\"'" % js_test_resources_dir,
'-c', "\'Alias /media-resources \"%s\"'" % media_resources_dir,
@@ -121,7 +120,7 @@ class LayoutTestApacheHttpd(http_server_base.HttpServerBase):
'-c', "\'MaxSpareServers %d\'" % self._number_of_servers]
stop_cmd = [executable,
- '-f', "\"%s\"" % self._get_apache_config_file_path(test_dir, output_dir),
+ '-f', "\"%s\"" % self._port_obj.path_to_apache_config_file(),
'-c', "\'PidFile %s'" % self._pid_file,
'-k', "stop"]
@@ -133,21 +132,6 @@ class LayoutTestApacheHttpd(http_server_base.HttpServerBase):
self._start_cmd = " ".join(start_cmd)
self._stop_cmd = " ".join(stop_cmd)
- def _get_apache_config_file_path(self, test_dir, output_dir):
- """Returns the path to the apache config file to use.
- Args:
- test_dir: absolute path to the LayoutTests directory.
- output_dir: absolute path to the layout test results directory.
- """
- httpd_config = self._port_obj._path_to_apache_config_file()
- httpd_config_copy = os.path.join(output_dir, "httpd.conf")
- httpd_conf = self._filesystem.read_text_file(httpd_config)
-
- # FIXME: Why do we need to copy the config file since we're not modifying it?
- self._filesystem.write_text_file(httpd_config_copy, httpd_conf)
-
- return httpd_config_copy
-
def _spawn_process(self):
_log.debug('Starting %s server, cmd="%s"' % (self._name, str(self._start_cmd)))
retval, err = self._run(self._start_cmd)

Powered by Google App Engine
This is Rietveld 408576698