make socks.py and http.py shut themselves down after a timeout of inactivity (maybe that will fix the problem of them lingering, stalling tests). fix some issues in run_regression_tests.py
This commit is contained in:
parent
fdaffc5f1a
commit
d1f41a72f4
|
@ -192,6 +192,7 @@ def start_server(host='localhost', port=8080, IPv6=False, timeout=60,
|
|||
else:
|
||||
soc_type=socket.AF_INET
|
||||
soc = socket.socket(soc_type)
|
||||
soc.settimeout(50)
|
||||
print "Serving on %s:%d."%(host, port)#debug
|
||||
soc.bind((host, port))
|
||||
soc.listen(0)
|
||||
|
|
|
@ -13,6 +13,10 @@ import sys
|
|||
|
||||
class MyTCPServer(ThreadingTCPServer):
|
||||
allow_reuse_address = True
|
||||
|
||||
def handle_timeout(self):
|
||||
raise Exception('timeout')
|
||||
|
||||
CLOSE = object()
|
||||
|
||||
logging.basicConfig(stream=sys.stderr, level=logging.INFO)
|
||||
|
@ -252,4 +256,6 @@ if __name__ == '__main__':
|
|||
|
||||
info('Listening on port %d...' % listen_port)
|
||||
server = MyTCPServer(('localhost', listen_port), SocksHandler)
|
||||
server.serve_forever()
|
||||
server.timeout = 50
|
||||
while True:
|
||||
server.handle_request()
|
||||
|
|
|
@ -88,11 +88,11 @@ def loop():
|
|||
|
||||
skip = '-s' in sys.argv
|
||||
|
||||
rev_file = os.path.join(os.getcwd(), '.rev')
|
||||
if skip:
|
||||
sys.argv.remove('-s')
|
||||
last_rev = run_tests.svn_info()[0] - 1
|
||||
else:
|
||||
rev_file = os.path.join(os.getcwd(), '.rev')
|
||||
print 'restoring last state from "%s"' % rev_file
|
||||
|
||||
try:
|
||||
|
|
|
@ -100,7 +100,6 @@ def run_tests(toolset, tests, features, options, test_dir, time_limit, increment
|
|||
# p.wait()
|
||||
|
||||
for t in tests:
|
||||
if t != '': cmdline.append(t)
|
||||
if t == '':
|
||||
t = os.path.split(os.getcwd())[1]
|
||||
# we can't pass in a launcher when just building, that only
|
||||
|
@ -109,6 +108,7 @@ def run_tests(toolset, tests, features, options, test_dir, time_limit, increment
|
|||
options = options[:]
|
||||
options.remove('launcher=valgrind')
|
||||
cmdline = ['bjam', '--out-xml=%s' % xml_file, '-l%d' % time_limit, '--abbreviate-paths', toolset] + options + feature_list
|
||||
if t != '': cmdline.append(t)
|
||||
|
||||
# print ' '.join(cmdline)
|
||||
|
||||
|
|
Loading…
Reference in New Issue