コード例 #1
0
ファイル: disco_test.py プロジェクト: supython-coder/cppcms
    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)
コード例 #2
0
ファイル: proto_test.py プロジェクト: lilinj2000/cppcms-1.0.5
 def load(name):
     file = load_file(name)
     return toscgi.toscgi(file)
コード例 #3
0
ファイル: disco_test.py プロジェクト: melpon/cppcms
    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)
コード例 #4
0
ファイル: disco_test.py プロジェクト: dreamsxin/CppCMS
    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);
コード例 #5
0
ファイル: proto_test.py プロジェクト: klupek/cppcms
 def load(name):
     file=load_file(name)
     return toscgi.toscgi(file)
コード例 #6
0
ファイル: disco_test.py プロジェクト: klupek/cppcms
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()