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

Side by Side Diff: tools/python/google/platform_utils_mac.py

Issue 10834299: Give time to free the port when shutting down apache on OSX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | 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 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 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 """Platform-specific utility methods shared by several scripts.""" 5 """Platform-specific utility methods shared by several scripts."""
6 6
7 import os 7 import os
8 import subprocess 8 import subprocess
9 9
10 import google.path_utils 10 import google.path_utils
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 def GetStopHttpdCommand(self): 133 def GetStopHttpdCommand(self):
134 """Returns a list of strings that contains the command line+args needed to 134 """Returns a list of strings that contains the command line+args needed to
135 stop the http server used in the http tests. 135 stop the http server used in the http tests.
136 136
137 This tries to fetch the pid of httpd (if available) and returns the 137 This tries to fetch the pid of httpd (if available) and returns the
138 command to kill it. If pid is not available, kill all httpd processes 138 command to kill it. If pid is not available, kill all httpd processes
139 """ 139 """
140 140
141 if not self._httpd_cmd_string: 141 if not self._httpd_cmd_string:
142 return ["true"] # Haven't been asked for the start cmd yet. Just pass. 142 return ["true"] # Haven't been asked for the start cmd yet. Just pass.
143 return [self._bash, "-c", self._httpd_cmd_string + ' -k stop'] 143 # Add a sleep after the shutdown because sometimes it takes some time for
144 # the port to be available again.
145 return [self._bash, "-c", self._httpd_cmd_string + ' -k stop && sleep 5']
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698