refine test
This commit is contained in:
13
test.py
13
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:
|
||||
|
Reference in New Issue
Block a user