input = load_file('disco_test_async_nonblocking.in') test_io(input, socket_type, target) elif test == 'fastcgi_tcp' or test == 'fastcgi_unix': input = tofcgi.to_fcgi_request(load_file('disco_test_norm_cgi.in')) test_io(input, socket_type, target) input = tofcgi.to_fcgi_request(load_file('disco_test_gzip_cgi.in')) test_io(input, socket_type, target) input = tofcgi.to_fcgi_request( load_file('disco_test_async_cgi_multiple.in')) test_io(input, socket_type, target) input = tofcgi.to_fcgi_request(load_file('disco_test_async_cgi_single.in')) test_io(input, socket_type, target) input = tofcgi.to_fcgi_request( load_file('disco_test_async_cgi_nonblocking.in')) test_io(input, socket_type, target) elif test == 'scgi_tcp' or test == 'scgi_unix': input = toscgi.toscgi(load_file('disco_test_norm_cgi.in')) test_io(input, socket_type, target) input = toscgi.toscgi(load_file('disco_test_gzip_cgi.in')) test_io(input, socket_type, target) input = toscgi.toscgi(load_file('disco_test_async_cgi_multiple.in')) test_io(input, socket_type, target) input = toscgi.toscgi(load_file('disco_test_async_cgi_single.in')) test_io(input, socket_type, target) input = toscgi.toscgi(load_file('disco_test_async_cgi_nonblocking.in')) test_io(input, socket_type, target) else: usege() time.sleep(0.5)
def load(name): file = load_file(name) return toscgi.toscgi(file)
input = load_file("disco_test_norm.in") test_io(input, socket_type, target) input = load_file("disco_test_gzip.in") test_io(input, socket_type, target) input = load_file("disco_test_async_multiple.in") test_io(input, socket_type, target) input = load_file("disco_test_async_single.in") test_io(input, socket_type, target) elif test == "fastcgi_tcp" or test == "fastcgi_unix": input = tofcgi.to_fcgi_request(load_file("disco_test_norm_cgi.in")) test_io(input, socket_type, target) input = tofcgi.to_fcgi_request(load_file("disco_test_gzip_cgi.in")) test_io(input, socket_type, target) input = tofcgi.to_fcgi_request(load_file("disco_test_async_cgi_multiple.in")) test_io(input, socket_type, target) input = tofcgi.to_fcgi_request(load_file("disco_test_async_cgi_single.in")) test_io(input, socket_type, target) elif test == "scgi_tcp" or test == "scgi_unix": input = toscgi.toscgi(load_file("disco_test_norm_cgi.in")) test_io(input, socket_type, target) input = toscgi.toscgi(load_file("disco_test_gzip_cgi.in")) test_io(input, socket_type, target) input = toscgi.toscgi(load_file("disco_test_async_cgi_multiple.in")) test_io(input, socket_type, target) input = toscgi.toscgi(load_file("disco_test_async_cgi_single.in")) test_io(input, socket_type, target) else: usege() time.sleep(0.5)
input = load_file('disco_test_async_single.in'); test_io(input,socket_type,target); input = load_file('disco_test_async_nonblocking.in'); test_io(input,socket_type,target); elif test=='fastcgi_tcp' or test=='fastcgi_unix': input = tofcgi.to_fcgi_request(load_file('disco_test_norm_cgi.in')); test_io(input,socket_type,target); input = tofcgi.to_fcgi_request(load_file('disco_test_gzip_cgi.in')); test_io(input,socket_type,target); input = tofcgi.to_fcgi_request(load_file('disco_test_async_cgi_multiple.in')); test_io(input,socket_type,target); input = tofcgi.to_fcgi_request(load_file('disco_test_async_cgi_single.in')); test_io(input,socket_type,target); input = tofcgi.to_fcgi_request(load_file('disco_test_async_cgi_nonblocking.in')); test_io(input,socket_type,target); elif test=='scgi_tcp' or test=='scgi_unix': input = toscgi.toscgi(load_file('disco_test_norm_cgi.in')); test_io(input,socket_type,target); input = toscgi.toscgi(load_file('disco_test_gzip_cgi.in')); test_io(input,socket_type,target); input = toscgi.toscgi(load_file('disco_test_async_cgi_multiple.in')); test_io(input,socket_type,target); input = toscgi.toscgi(load_file('disco_test_async_cgi_single.in')); test_io(input,socket_type,target); input = toscgi.toscgi(load_file('disco_test_async_cgi_nonblocking.in')); test_io(input,socket_type,target); else: usege() time.sleep(0.5);
def load(name): file=load_file(name) return toscgi.toscgi(file)
def usege(): print './disco_test.py (http|fastcgi_tcp|scgi_tcp|fastcgi_unix|scgi_unix)' test=sys.argv[1] if test=='http' or test=='fastcgi_tcp' or test=='scgi_tcp': target=('localhost',8080) socket_type=socket.AF_INET else: target=('/tmp/cppcms_test_socket') socket_type=socket.AF_UNIX if test=='http': input = load_file('disco_test_norm.in'); test_io(input,socket_type,target); input = load_file('disco_test_gzip.in'); test_io(input,socket_type,target); elif test=='fastcgi_tcp' or test=='fastcgi_unix': input = tofcgi.to_fcgi_request(load_file('disco_test_norm_cgi.in')); test_io(input,socket_type,target); input = tofcgi.to_fcgi_request(load_file('disco_test_gzip_cgi.in')); test_io(input,socket_type,target); elif test=='scgi_tcp' or test=='scgi_unix': input = toscgi.toscgi(load_file('disco_test_norm_cgi.in')); test_io(input,socket_type,target); input = toscgi.toscgi(load_file('disco_test_gzip_cgi.in')); test_io(input,socket_type,target); else: usege()