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

Side by Side Diff: testing/legion/client_lib.py

Issue 870103005: Adding a server side, non-blocking subprocess mechanism. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed the GetStd*** names and added some usage docs. Created 5 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
« no previous file with comments | « no previous file | testing/legion/client_rpc_methods.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 """Defines the client library.""" 5 """Defines the client library."""
6 6
7 import argparse 7 import argparse
8 import datetime 8 import datetime
9 import logging 9 import logging
10 import os 10 import os
11 import socket 11 import socket
12 import subprocess 12 import subprocess
13 import sys 13 import sys
14 import tempfile 14 import tempfile
15 import threading 15 import threading
16 import xmlrpclib 16 import xmlrpclib
17 17
18 #pylint: disable=relative-import 18 #pylint: disable=relative-import
19 import common_lib 19 import common_lib
20 20
21 THIS_DIR = os.path.dirname(os.path.abspath(__file__)) 21 ISOLATE_PY = os.path.join(common_lib.SWARMING_DIR, 'isolate.py')
22 SWARMING_DIR = os.path.join(THIS_DIR, '..', '..', 'tools/swarming_client') 22 SWARMING_PY = os.path.join(common_lib.SWARMING_DIR, 'swarming.py')
23 ISOLATE_PY = os.path.join(SWARMING_DIR, 'isolate.py')
24 SWARMING_PY = os.path.join(SWARMING_DIR, 'swarming.py')
25 23
26 24
27 class Error(Exception): 25 class Error(Exception):
28 pass 26 pass
29 27
30 28
31 class ConnectionTimeoutError(Error): 29 class ConnectionTimeoutError(Error):
32 pass 30 pass
33 31
34 32
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 if p.returncode != 0: 202 if p.returncode != 0:
205 raise Error(stderr) 203 raise Error(stderr)
206 204
207 def OnConnect(self, ip_address): 205 def OnConnect(self, ip_address):
208 """Receives client ip address on connection.""" 206 """Receives client ip address on connection."""
209 self._ip_address = ip_address 207 self._ip_address = ip_address
210 self._connected = True 208 self._connected = True
211 self._rpc = common_lib.ConnectToServer(self._ip_address) 209 self._rpc = common_lib.ConnectToServer(self._ip_address)
212 logging.info('%s connected from %s', self._name, ip_address) 210 logging.info('%s connected from %s', self._name, ip_address)
213 self._connect_event.set() 211 self._connect_event.set()
OLDNEW
« no previous file with comments | « no previous file | testing/legion/client_rpc_methods.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698