Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py |
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py |
index f9ec1a7dc54de97f04c8820c79ed540e08faf48d..46008819e6019ec4e8c7f7d453eafd53a0979b70 100644 |
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py |
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py |
@@ -25,7 +25,6 @@ |
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
- |
"""Package that implements the ServerProcess wrapper class""" |
import errno |
@@ -55,10 +54,8 @@ else: |
from webkitpy.common.system.executive import ScriptError |
- |
_log = logging.getLogger(__name__) |
- |
_trailing_spaces_re = re.compile('(.*[^ ])?( +)$') |
@@ -72,6 +69,7 @@ def quote_data(data): |
lines.append(l) |
return lines |
+ |
class ServerProcess(object): |
"""This class provides a wrapper around a subprocess that |
implements a simple request/response usage model. The primary benefit |
@@ -79,8 +77,7 @@ class ServerProcess(object): |
indefinitely. The class also handles transparently restarting processes |
as necessary to keep issuing commands.""" |
- def __init__(self, port_obj, name, cmd, env=None, universal_newlines=False, treat_no_data_as_crash=False, |
- logging=False): |
+ def __init__(self, port_obj, name, cmd, env=None, universal_newlines=False, treat_no_data_as_crash=False, logging=False): |
self._port = port_obj |
self._name = name # Should be the command name (e.g. content_shell, image_diff) |
self._cmd = cmd |
@@ -136,12 +133,13 @@ class ServerProcess(object): |
if self._env: |
env_str += '\n'.join("%s=%s" % (k, v) for k, v in self._env.items()) + '\n' |
_log.info('CMD: \n%s%s\n', env_str, _quote_cmd(self._cmd)) |
- self._proc = self._host.executive.popen(self._cmd, stdin=self._host.executive.PIPE, |
- stdout=self._host.executive.PIPE, |
- stderr=self._host.executive.PIPE, |
- close_fds=close_fds, |
- env=self._env, |
- universal_newlines=self._universal_newlines) |
+ self._proc = self._host.executive.popen(self._cmd, |
+ stdin=self._host.executive.PIPE, |
+ stdout=self._host.executive.PIPE, |
+ stderr=self._host.executive.PIPE, |
+ close_fds=close_fds, |
+ env=self._env, |
+ universal_newlines=self._universal_newlines) |
self._pid = self._proc.pid |
fd = self._proc.stdout.fileno() |
if not self._use_win32_apis: |