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

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/servers/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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2011 Google Inc. All rights reserved. 1 # Copyright (C) 2011 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 f = self._filesystem.open_text_file_for_writing(out_conf_file) 102 f = self._filesystem.open_text_file_for_writing(out_conf_file)
103 f.write(base_conf) 103 f.write(base_conf)
104 104
105 # Write out our cgi handlers. Run perl through env so that it 105 # Write out our cgi handlers. Run perl through env so that it
106 # processes the #! line and runs perl with the proper command 106 # processes the #! line and runs perl with the proper command
107 # line arguments. Emulate apache's mod_asis with a cat cgi handler. 107 # line arguments. Emulate apache's mod_asis with a cat cgi handler.
108 f.write(('cgi.assign = ( ".cgi" => "/usr/bin/env",\n' 108 f.write(('cgi.assign = ( ".cgi" => "/usr/bin/env",\n'
109 ' ".pl" => "/usr/bin/env",\n' 109 ' ".pl" => "/usr/bin/env",\n'
110 ' ".asis" => "/bin/cat",\n' 110 ' ".asis" => "/bin/cat",\n'
111 ' ".php" => "%s" )\n\n') % 111 ' ".php" => "%s" )\n\n') %
112 self._port_obj._path_to_lighttpd_php()) 112 self._port_obj.path_to_lighttpd_php())
113 113
114 # Setup log files 114 # Setup log files
115 f.write(('server.errorlog = "%s"\n' 115 f.write(('server.errorlog = "%s"\n'
116 'accesslog.filename = "%s"\n\n') % (error_log, access_log)) 116 'accesslog.filename = "%s"\n\n') % (error_log, access_log))
117 117
118 # Setup upload folders. Upload folder is to hold temporary upload files 118 # Setup upload folders. Upload folder is to hold temporary upload files
119 # and also POST data. This is used to support XHR layout tests that 119 # and also POST data. This is used to support XHR layout tests that
120 # does POST. 120 # does POST.
121 f.write(('server.upload-dirs = ( "%s" )\n\n') % (self._output_dir)) 121 f.write(('server.upload-dirs = ( "%s" )\n\n') % (self._output_dir))
122 122
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 if 'sslcert' in mapping: 154 if 'sslcert' in mapping:
155 ssl_setup = (' ssl.engine = "enable"\n' 155 ssl_setup = (' ssl.engine = "enable"\n'
156 ' ssl.pemfile = "%s"\n' % mapping['sslcert']) 156 ' ssl.pemfile = "%s"\n' % mapping['sslcert'])
157 157
158 f.write(('$SERVER["socket"] == "127.0.0.1:%d" {\n' 158 f.write(('$SERVER["socket"] == "127.0.0.1:%d" {\n'
159 ' server.document-root = "%s"\n' + 159 ' server.document-root = "%s"\n' +
160 ssl_setup + 160 ssl_setup +
161 '}\n\n') % (mapping['port'], mapping['docroot'])) 161 '}\n\n') % (mapping['port'], mapping['docroot']))
162 f.close() 162 f.close()
163 163
164 executable = self._port_obj._path_to_lighttpd() 164 executable = self._port_obj.path_to_lighttpd()
165 module_path = self._port_obj._path_to_lighttpd_modules() 165 module_path = self._port_obj.path_to_lighttpd_modules()
166 start_cmd = [executable, 166 start_cmd = [executable,
167 # Newly written config file 167 # Newly written config file
168 '-f', os.path.join(self._output_dir, 'lighttpd.conf'), 168 '-f', os.path.join(self._output_dir, 'lighttpd.conf'),
169 # Where it can find its module dynamic libraries 169 # Where it can find its module dynamic libraries
170 '-m', module_path] 170 '-m', module_path]
171 171
172 if not self._run_background: 172 if not self._run_background:
173 start_cmd.append(# Don't background 173 start_cmd.append(# Don't background
174 '-D') 174 '-D')
175 175
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 # FIXME: https://bugs.webkit.org/show_bug.cgi?id=106838 219 # FIXME: https://bugs.webkit.org/show_bug.cgi?id=106838
220 # We need to kill all of the child processes as well as the 220 # We need to kill all of the child processes as well as the
221 # parent, so we can't use executive.kill_process(). 221 # parent, so we can't use executive.kill_process().
222 # 222 #
223 # If this is actually working, we should figure out a clean API. 223 # If this is actually working, we should figure out a clean API.
224 self._executive.run_command(["taskkill.exe", "/f", "/t", "/pid", self._pid], error_handler=self._executive.ignore_error) 224 self._executive.run_command(["taskkill.exe", "/f", "/t", "/pid", self._pid], error_handler=self._executive.ignore_error)
225 else: 225 else:
226 self._executive.kill_process(self._pid) 226 self._executive.kill_process(self._pid)
227 return False 227 return False
228 return True 228 return True
OLDNEW
« no previous file with comments | « Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698