OLD | NEW |
1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """A class to start/stop the apache http server used by layout tests.""" | 5 """A class to start/stop the apache http server used by layout tests.""" |
6 | 6 |
7 import logging | 7 import logging |
8 import optparse | 8 import optparse |
9 import os | 9 import os |
10 import re | 10 import re |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 else: | 194 else: |
195 raise Exception('Failed to start http server') | 195 raise Exception('Failed to start http server') |
196 | 196 |
197 def Stop(self): | 197 def Stop(self): |
198 """Stops the apache http server.""" | 198 """Stops the apache http server.""" |
199 logging.debug("Shutting down any running http servers") | 199 logging.debug("Shutting down any running http servers") |
200 httpd_pid = None | 200 httpd_pid = None |
201 if os.path.exists(self._pid_file): | 201 if os.path.exists(self._pid_file): |
202 httpd_pid = int(open(self._pid_file).readline()) | 202 httpd_pid = int(open(self._pid_file).readline()) |
203 path_utils.ShutDownHTTPServer(httpd_pid) | 203 path_utils.ShutDownHTTPServer(httpd_pid) |
OLD | NEW |