THRIFT-847 Test Framework harmonization across all languages
Added 'ssl' tests for python tests.
Added '-transport arg (=buffered) transport: buffered, framed, http' to test/py/TestServer.py and test/py/TestClient.py and removed '-framed' arguement.
Changed test/py/RunClientServer.py to match above changes.
Added tests to compact protocol in python cases.
Added tests to test BinaryAccelarated protocol with Binary Protocol.
Changed py/TestClient.py and py/TestServer.py from --proto to --protocol parameter
Patch: Chamila Dilshan Wijayarathna & Roger Meier
diff --git a/test/py/RunClientServer.py b/test/py/RunClientServer.py
index 782bd83..46c9f8a 100755
--- a/test/py/RunClientServer.py
+++ b/test/py/RunClientServer.py
@@ -34,10 +34,10 @@
help='directory extensions for generated code, used as suffixes for \"gen-py-*\" added sys.path for individual tests')
parser.add_option("--port", type="int", dest="port", default=9090,
help="port number for server to listen on")
-parser.add_option('-v', '--verbose', action="store_const",
+parser.add_option('-v', '--verbose', action="store_const",
dest="verbose", const=2,
help="verbose output")
-parser.add_option('-q', '--quiet', action="store_const",
+parser.add_option('-q', '--quiet', action="store_const",
dest="verbose", const=0,
help="minimal output")
parser.set_defaults(verbose=1)
@@ -107,14 +107,14 @@
ret = subprocess.call(script_args)
if ret != 0:
raise Exception("Script subprocess failed, retcode=%d, args: %s" % (ret, ' '.join(script_args)))
-
+
def runServiceTest(genpydir, server_class, proto, port, use_zlib, use_ssl):
# Build command line arguments
server_args = [sys.executable, relfile('TestServer.py') ]
cli_args = [sys.executable, relfile('TestClient.py') ]
for which in (server_args, cli_args):
which.append('--genpydir=%s' % genpydir)
- which.append('--proto=%s' % proto) # accel, binary or compact
+ which.append('--protocol=%s' % proto) # accel, binary or compact
which.append('--port=%d' % port) # default to 9090
if use_zlib:
which.append('--zlib')
@@ -128,7 +128,9 @@
server_args.append(server_class)
# client-specific cmdline options
if server_class in FRAMED:
- cli_args.append('--framed')
+ cli_args.append('--transport=framed')
+ else:
+ cli_args.append('--transport=buffered')
if server_class == 'THttpServer':
cli_args.append('--http=/')
if options.verbose > 0:
@@ -186,7 +188,7 @@
for genpydir in generated_dirs:
for script in SCRIPTS:
runScriptTest(genpydir, script)
-
+
print '----------------'
print ' Executing Client/Server tests with various generated code directories'
print ' Servers to be tested: ' + ', '.join(SERVERS)