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

Side by Side Diff: webkit/tools/layout_tests/layout_package/platform_utils_linux.py

Issue 10653: Add Linux lighttpd for running LayoutTests on Linux. (Closed)
Patch Set: Added friendly error-message Created 12 years, 1 month 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
« no previous file with comments | « webkit/tools/layout_tests/layout_package/http_server.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 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2008 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2008 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Platform-specific utility methods shared by several scripts.""" 6 """Platform-specific utility methods shared by several scripts."""
7 7
8 import os 8 import os
9 import re 9 import re
10 import subprocess 10 import subprocess
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 use_http=True, 86 use_http=True,
87 use_ssl=use_ssl, 87 use_ssl=use_ssl,
88 port=port) 88 port=port)
89 89
90 # Run off file:// 90 # Run off file://
91 return PlatformUtility._FilenameToUri(self, full_path, use_http=False, 91 return PlatformUtility._FilenameToUri(self, full_path, use_http=False,
92 use_ssl=False, port=0) 92 use_ssl=False, port=0)
93 93
94 def LigHTTPdExecutablePath(self): 94 def LigHTTPdExecutablePath(self):
95 """Returns the executable path to start LigHTTPd""" 95 """Returns the executable path to start LigHTTPd"""
96 return PathFromBase('third_party', 'lighttpd', 'linux', 'bin', 'lighttpd') 96 binpath = "/usr/sbin/lighttpd"
97 if os.path.exists(binpath):
98 return binpath
99 print "Unable to find LigHTTPd executable %s" % binpath
100 print 'Please install lighttpd/php using "sudo apt-get install lighttpd php5 cgi"'
tony 2008/11/18 20:49:25 Nit: 80 col (see two others below).
101 sys.exit(1)
97 102
98 def LigHTTPdModulePath(self): 103 def LigHTTPdModulePath(self):
99 """Returns the library module path for LigHTTPd""" 104 """Returns the library module path for LigHTTPd"""
100 return PathFromBase('third_party', 'lighttpd', 'linux', 'lib') 105 modpath = "/usr/lib/lighttpd"
106 if os.path.exists(modpath):
107 return modpath
108 print "Unable to find LigHTTPd modules %s" % modpath
109 print 'Please install lighttpd/php using "sudo apt-get install lighttpd php5 cgi"'
110 sys.exit(1)
101 111
102 def LigHTTPdPHPPath(self): 112 def LigHTTPdPHPPath(self):
103 """Returns the PHP executable path for LigHTTPd""" 113 """Returns the PHP executable path for LigHTTPd"""
104 return PathFromBase('third_party', 'lighttpd', 'linux', 'bin', 'php-cgi') 114 binpath = "/usr/bin/php-cgi"
115 if os.path.exists(binpath):
116 return binpath
117 print "Unable to find PHP CGI executable %s" % binpath
118 print 'Please install lighttpd/php using "sudo apt-get install lighttpd php5 cgi"'
119 sys.exit(1)
105 120
106 def ShutDownHTTPServer(self, server_process): 121 def ShutDownHTTPServer(self, server_process):
107 """Shut down the lighttpd web server. Blocks until it's fully shut down. 122 """Shut down the lighttpd web server. Blocks until it's fully shut down.
108 123
109 Args: 124 Args:
110 server_process: The subprocess object representing the running server 125 server_process: The subprocess object representing the running server
111 """ 126 """
112 subprocess.Popen(('kill', '-TERM', '%d' % server_process.pid), 127 subprocess.Popen(('kill', '-TERM', '%d' % server_process.pid),
113 stdout=subprocess.PIPE, 128 stdout=subprocess.PIPE,
114 stderr=subprocess.PIPE).wait() 129 stderr=subprocess.PIPE).wait()
(...skipping 21 matching lines...) Expand all
136 151
137 def TestListPlatformDir(self): 152 def TestListPlatformDir(self):
138 """Return the platform-specific directory for where the test lists live""" 153 """Return the platform-specific directory for where the test lists live"""
139 return 'linux' 154 return 'linux'
140 155
141 def PlatformDir(self): 156 def PlatformDir(self):
142 """Returns the most specific directory name where platform-specific 157 """Returns the most specific directory name where platform-specific
143 results live. 158 results live.
144 """ 159 """
145 return 'chromium-linux' 160 return 'chromium-linux'
OLDNEW
« no previous file with comments | « webkit/tools/layout_tests/layout_package/http_server.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698