From 4fd19a7714cfd2deb36b4acd7674c23c145bc62b Mon Sep 17 00:00:00 2001 From: clowwindy Date: Fri, 20 Jun 2014 22:32:10 +0800 Subject: [PATCH] refine test --- test.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test.py b/test.py index 154f352..68b120f 100755 --- a/test.py +++ b/test.py @@ -13,10 +13,10 @@ encrypt_salsa20.test() print 'encryption test passed' -p1 = Popen(['python', 'shadowsocks/server.py', '-c', sys.argv[-1]], shell=False, - bufsize=0, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True) -p2 = Popen(['python', 'shadowsocks/local.py', '-c', sys.argv[-1]], shell=False, - bufsize=0, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True) +p1 = Popen(['python', 'shadowsocks/server.py', '-c', sys.argv[-1]], stdin=PIPE, + stdout=PIPE, stderr=PIPE, close_fds=True) +p2 = Popen(['python', 'shadowsocks/local.py', '-c', sys.argv[-1]], stdin=PIPE, + stdout=PIPE, stderr=PIPE, close_fds=True) p3 = None try: @@ -39,10 +39,9 @@ try: if local_ready and server_ready and p3 is None: time.sleep(1) p3 = Popen(['curl', 'http://www.example.com/', '-v', '-L', - '--socks5-hostname', '127.0.0.1:1081'], shell=False, - bufsize=0, close_fds=True) + '--socks5-hostname', '127.0.0.1:1081'], close_fds=True) break - + if p3 is not None: r = p3.wait() if r == 0: