Browse Source

fix test

1.4
clowwindy 12 years ago
parent
commit
36d8039288
  1. 18
      test.py

18
test.py

@ -105,10 +105,14 @@ try:
if ready_count == 2 and p3 is None: if ready_count == 2 and p3 is None:
p3 = Popen(['curl', 'http://www.google.com/', '-v', '-L', p3 = Popen(['curl', 'http://www.google.com/', '-v', '-L',
'--socks5-hostname', '127.0.0.1:1080'], shell=False, '--socks5-hostname', '127.0.0.1:1080'], shell=False,
bufsize=0, stdin=PIPE, stdout=PIPE, stderr=PIPE, bufsize=0, close_fds=True)
close_fds=True) break
fdset.append(p3.stdout)
fdset.append(p3.stderr) if p3 is not None:
r = p3.wait()
if r == 0:
print 'test passed'
sys.exit(r)
finally: finally:
for p in [p1, p2]: for p in [p1, p2]:
@ -117,10 +121,4 @@ finally:
except OSError: except OSError:
pass pass
if p3 is not None:
r = p3.wait()
if r == 0:
print 'test passed'
sys.exit(r)
sys.exit(-1) sys.exit(-1)

Loading…
Cancel
Save