blob: 28923789e82bed18057719419aa109f246a3a5ef [file] [log] [blame]
Roger Meier4d5157d2012-01-09 21:23:19 +00001#!/bin/sh
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance
9# with the License. You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing,
14# software distributed under the License is distributed on an
15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16# KIND, either express or implied. See the License for the
17# specific language governing permissions and limitations
18# under the License.
19#
20
21# Apache Thrift - integration test suite
22#
23# tests different client-server, protocol and transport combinations
24
25# related issues:
26# THRIFT-847 Test Framework harmonization across all languages
27# THRIFT-819 add Enumeration for protocol, transport and server types
28
Roger Meiercc0fe272014-05-16 23:18:25 +020029START_TIME=$SECONDS
henriqued17f1c92014-04-30 16:21:25 +020030cd "$( dirname "$0" )"
31BASEDIR=$(pwd)
32
Roger Meierbea27342014-08-08 00:30:50 +020033TESTCOUNT=0
34FAILED=0
35
Roger Meier4d5157d2012-01-09 21:23:19 +000036print_header() {
Roger Meier76150722014-05-31 22:22:07 +020037 printf "%-16s %-13s %-17s %-s\n" "client-server:" "protocol:" "transport:" "result:"
Roger Meier4d5157d2012-01-09 21:23:19 +000038}
39
Roger Meiercc0fe272014-05-16 23:18:25 +020040STATUS_HTML="status.html"
41
42print_html_header() {
43cat << EOF > $STATUS_HTML
44<!DOCTYPE HTML>
45<html>
46<head>
47<meta charset="utf-8">
48<title>Apache Thrift - integration test suite</title>
49<link rel="stylesheet" type="text/css" href="http://cdn.datatables.net/1.10.0/css/jquery.dataTables.css">
50<script type="text/javascript" charset="utf-8" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
51<script type="text/javascript" charset="utf-8" src="http://cdn.datatables.net/1.10.0/js/jquery.dataTables.js"></script>
52<script>
53 var test_data;
54 \$(document).ready( function () {
55 testTable = \$('#test_results').DataTable( {
56 data: test_data
57 });
58 \$('#test_results_filter label input')
59 .focus()
60 .val('failure');
61 });
62</script>
63</head>
64<body>
65<h2>Apache Thrift - integration test suite: Results</h2>
66<table id="test_results" class="display">
67 <thead>
68 <tr>
69 <th>Server</th>
70 <th>Client</th>
71 <th>Protocol</th>
72 <th>Transport</th>
73 <th>Result (log)</th>
74 </tr>
75 </thead>
76</table>
77<script>
78test_data = [
79EOF
80}
81
82print_html_footer() {
83duration=$1
84cat << EOF >> $STATUS_HTML
85]
86</script>
87<h2>Test Information</h2>
88<pre>
89Test Date: `date --iso-8601=seconds`
90Revision: `git rev-parse --short HEAD`
91OS: `uname -a`
92Test duration: $duration
93</pre>
94</body>
95</html>
96EOF
97}
98
Roger Meierf42ce2a2013-01-16 22:12:14 +010099intersection() {
100 return_value=""
101 for one in $1; do
102 for two in $2; do
103 if [ ${one} = ${two} ]; then
104 return_value=${return_value}" "${one}
105 fi
106 done;
107 done;
108 echo ${return_value};
109}
110
Roger Meier4d5157d2012-01-09 21:23:19 +0000111do_test () {
112 client_server=$1
113 protocol=$2
114 transport=$3
115 client_exec=$4
116 server_exec=$5
henriqued17f1c92014-04-30 16:21:25 +0200117 client_timeout=$6
118 server_startup_time=$7
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530119
Roger Meier4d5157d2012-01-09 21:23:19 +0000120 testname=${client_server}_${protocol}_${transport}
henriqued5aba4c2014-04-30 18:11:11 +0200121 server_timeout=$(echo "(${server_startup_time}+${client_timeout})" | bc)
Roger Meier76150722014-05-31 22:22:07 +0200122 printf "%-16s %-13s %-17s" ${client_server} ${protocol} ${transport}
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530123
Roger Meier284101c2014-03-11 21:20:35 +0100124 timeout $server_timeout $server_exec > log/${testname}_server.log 2>&1 &
henriqued17f1c92014-04-30 16:21:25 +0200125 server_pid=$!
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530126
Roger Meier4d5157d2012-01-09 21:23:19 +0000127 sleep $server_startup_time
henriqued17f1c92014-04-30 16:21:25 +0200128 timeout $client_timeout $client_exec > log/${testname}_client.log 2>&1
Ben Craigf41d79d2014-01-08 15:15:48 -0600129
Roger Meier4d5157d2012-01-09 21:23:19 +0000130 if [ "$?" -eq "0" ]; then
Roger Meiercc0fe272014-05-16 23:18:25 +0200131 result="success($?)"
132 echo " $result"
Roger Meier4d5157d2012-01-09 21:23:19 +0000133 else
Roger Meiercc0fe272014-05-16 23:18:25 +0200134 result="failure($?)"
135 echo " $result"
Roger Meier4edac7f2014-05-02 21:07:01 +0200136 # add details to the error.log
137 print_header >> log/error.log
138 printf "%-16s %-11s %-17s\n" ${client_server} ${protocol} ${transport} >> log/error.log
139 echo "=================== server message ===================" >> log/error.log
140 tail log/${testname}_server.log >> log/error.log
141 echo "=================== client message ===================" >> log/error.log
142 tail log/${testname}_client.log >> log/error.log
143 echo "======================================================" >> log/error.log
144 echo "" >> log/error.log
Roger Meierbea27342014-08-08 00:30:50 +0200145 FAILED=$(($FAILED + 1))
Roger Meier4d5157d2012-01-09 21:23:19 +0000146 fi
Roger Meierbea27342014-08-08 00:30:50 +0200147 TESTCOUNT=$(($TESTCOUNT + 1))
henriqued17f1c92014-04-30 16:21:25 +0200148
henriquead4df162014-05-20 13:18:45 +0200149 # split client-server string
150 client=${client_server%-*}
151 server=${client_server#*-}
Roger Meiercc0fe272014-05-16 23:18:25 +0200152
153 cat << EOF >> $STATUS_HTML
154 [
Roger Meiercc0fe272014-05-16 23:18:25 +0200155 "${server}",
Roger Meierc62798b2014-05-23 12:54:08 +0200156 "${client}",
Roger Meiercc0fe272014-05-16 23:18:25 +0200157 "${protocol}",
158 "${transport}",
159 "${result} (<a href=\"log/${testname}_client.log\">client</a>, <a href=\"log/${testname}_server.log\">server</a>)"
160 ],
161EOF
162
henriqued17f1c92014-04-30 16:21:25 +0200163 # silently kill server
164 kill ${server_pid} 2>/dev/null && wait ${server_pid} 2>/dev/null
Roger Meier4d5157d2012-01-09 21:23:19 +0000165}
166
167echo "Apache Thrift - integration test suite"
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530168if [ "$#" -eq "0" ]; then
169 THRIFT_TEST_PORT=9090
170else
171 THRIFT_TEST_PORT=$1
172fi
Roger Meier4d5157d2012-01-09 21:23:19 +0000173date
henriqued17f1c92014-04-30 16:21:25 +0200174
henriqued17f1c92014-04-30 16:21:25 +0200175
Roger Meier4d5157d2012-01-09 21:23:19 +0000176echo "======================================================"
177
178rm -rf log
179mkdir -p log
180
Roger Meiercc0fe272014-05-16 23:18:25 +0200181
Roger Meier4d5157d2012-01-09 21:23:19 +0000182print_header
Roger Meiercc0fe272014-05-16 23:18:25 +0200183print_html_header
184
185ant -f ../lib/java/build.xml compile-test 1>/dev/null
186
Roger Meier4d5157d2012-01-09 21:23:19 +0000187
Roger Meier82525772012-11-16 00:38:27 +0000188#TODO add enum for parameters
189#TODO align program arguments across languages
Roger Meier4d5157d2012-01-09 21:23:19 +0000190
Roger Meier023192f2014-02-12 09:35:12 +0100191cpp_protocols="binary compact json"
192java_protocols="binary compact json"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100193cpp_transports="buffered framed http"
194java_server_transports="buffered framed fastframed"
195java_client_transports=${java_server_transports}" http"
Roger Meier5829a2c2014-04-08 00:28:17 +0200196cpp_sockets="ip domain ip-ssl"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100197java_sockets="ip ip-ssl"
198# TODO fastframed java transport is another implementation of framed transport
Roger Meier4d5157d2012-01-09 21:23:19 +0000199
Roger Meierd9b331d2014-05-25 22:59:17 +0200200nodejs_protocols="binary compact json"
Roger Meier8909cbd2014-01-26 11:44:27 +0100201nodejs_transports="buffered framed"
Roger Meier57b354b2014-02-22 01:01:58 +0100202nodejs_sockets="ip ip-ssl"
Roger Meiereaa61d82012-01-12 21:38:29 +0000203
Jens Geyerc1d79432014-04-22 22:52:43 +0200204csharp_protocols="binary compact json"
205csharp_transports="buffered framed"
206csharp_sockets="ip ip-ssl"
207
Roger Meier72268b72014-05-28 23:03:57 +0200208py_protocols="binary compact json accel"
Roger Meier76150722014-05-31 22:22:07 +0200209py_transports="buffered framed"
210py_sockets="ip ip-ssl"
Roger Meier72268b72014-05-28 23:03:57 +0200211
Roger Meiera3570ac2014-06-10 22:16:14 +0200212ruby_protocols="binary compact json accel"
213ruby_transports="buffered framed"
214ruby_sockets="ip"
215
Noam Zilbersteinaf5d64a2014-07-31 15:44:13 -0700216hs_protocols="binary compact json"
217hs_transports="buffered"
218hs_sockets="ip"
219
Roger Meierf42ce2a2013-01-16 22:12:14 +0100220######### java client - java server #############
221for proto in $java_protocols; do
222 for trans in $java_server_transports; do
223 for sock in $java_sockets; do
224 case "$sock" in
225 "ip" ) extraparam="";;
226 "ip-ssl" ) extraparam="--ssl";;
227 esac
228 do_test "java-java" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530229 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
230 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
henriqued5aba4c2014-04-30 18:11:11 +0200231 "5" "1"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100232 done
233 done
234done
235
236######### cpp client - cpp server ###############
237for proto in $cpp_protocols; do
238 for trans in $cpp_transports; do
239 for sock in $cpp_sockets; do
Roger Meier4d5157d2012-01-09 21:23:19 +0000240 case "$sock" in
241 "ip" ) extraparam="";;
242 "ip-ssl" ) extraparam="--ssl";;
243 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
244 esac
245 do_test "cpp-cpp" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530246 "cpp/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
247 "cpp/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
henriqued5aba4c2014-04-30 18:11:11 +0200248 "2" "0.1"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100249 done
250 done
251done
252
henriqued17f1c92014-04-30 16:21:25 +0200253
Roger Meierf42ce2a2013-01-16 22:12:14 +0100254######### java client - cpp server ##############
255# warning: ssl over http is not supported in java client!
256for proto in $(intersection "${java_protocols}" "${cpp_protocols}"); do
257 for trans in $(intersection "${java_client_transports}" "${cpp_transports}"); do
258 for sock in $(intersection "${java_sockets}" "${cpp_sockets}"); do
259 case "$sock" in
260 "ip" ) extraparam="";;
261 "ip-ssl" ) extraparam="--ssl";;
262 esac
Roger Meier188024e2014-04-17 21:53:45 +0200263 do_test "java-cpp" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530264 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
265 "cpp/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}"\
henriqued5aba4c2014-04-30 18:11:11 +0200266 "5" "0.1"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100267 done
268 done
269done
270
271######### cpp client - java server ##############
272for proto in $(intersection "${cpp_protocols}" "${java_protocols}"); do
273 for trans in $(intersection "${cpp_transports}" "${java_server_transports}"); do
274 for sock in $(intersection "${java_sockets}" "${cpp_sockets}"); do
275 case "$sock" in
276 "ip" ) extraparam="";;
277 "ip-ssl" ) extraparam="--ssl";;
278 esac
Roger Meier188024e2014-04-17 21:53:45 +0200279 do_test "cpp-java" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530280 "cpp/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
281 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
henriqued5aba4c2014-04-30 18:11:11 +0200282 "5" "1"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100283 done
284 done
285done
Roger Meier4d5157d2012-01-09 21:23:19 +0000286
Roger Meier8909cbd2014-01-26 11:44:27 +0100287
henriqued17f1c92014-04-30 16:21:25 +0200288NODE_TEST_DIR=${BASEDIR}/../lib/nodejs/test
Roger Meier8909cbd2014-01-26 11:44:27 +0100289export NODE_PATH=${NODE_TEST_DIR}:${NODE_TEST_DIR}/../lib:${NODE_PATH}
Roger Meierd9b331d2014-05-25 22:59:17 +0200290######### nodejs client - nodejs server ##############
Roger Meierd9b331d2014-05-25 22:59:17 +0200291for proto in ${nodejs_protocols}; do
292 for trans in ${nodejs_transports}; do
293 for sock in ${nodejs_sockets}; do
294 case "$sock" in
295 "ip" ) extraparam="";;
296 "ip-ssl" ) extraparam="--ssl";;
297 esac
298 do_test "nodejs-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530299 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
300 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meierd9b331d2014-05-25 22:59:17 +0200301 "5" "0.2"
302 done
303 done
304done
henriqued5aba4c2014-04-30 18:11:11 +0200305
Roger Meier8909cbd2014-01-26 11:44:27 +0100306######### nodejs client - cpp server ##############
Roger Meier8909cbd2014-01-26 11:44:27 +0100307for proto in $(intersection "${nodejs_protocols}" "${cpp_protocols}"); do
308 for trans in $(intersection "${nodejs_transports}" "${cpp_transports}"); do
309 for sock in $(intersection "${nodejs_sockets}" "${cpp_sockets}"); do
Roger Meier57b354b2014-02-22 01:01:58 +0100310 case "$sock" in
311 "ip" ) extraparam="";;
312 "ip-ssl" ) extraparam="--ssl";;
313 esac
henriqued17f1c92014-04-30 16:21:25 +0200314 do_test "nodejs-cpp" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530315 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
316 "cpp/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
henriqued5aba4c2014-04-30 18:11:11 +0200317 "5" "0.2"
Roger Meier8909cbd2014-01-26 11:44:27 +0100318 done
319 done
320done
321
322######### cpp client - nodejs server ##############
323for proto in $(intersection "${nodejs_protocols}" "${cpp_protocols}"); do
324 for trans in $(intersection "${nodejs_transports}" "${cpp_transports}"); do
325 for sock in $(intersection "${nodejs_sockets}" "${cpp_sockets}"); do
Roger Meier57b354b2014-02-22 01:01:58 +0100326 case "$sock" in
327 "ip" ) extraparam="";;
328 "ip-ssl" ) extraparam="--ssl";;
329 esac
henriqued17f1c92014-04-30 16:21:25 +0200330 do_test "cpp-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530331 "cpp/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
332 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
henriqued5aba4c2014-04-30 18:11:11 +0200333 "5" "2"
Roger Meier8909cbd2014-01-26 11:44:27 +0100334 done
335 done
336done
337
Roger Meier5c6ad242014-05-27 21:18:00 +0200338######### nodejs client - java server ##############
Roger Meier5c6ad242014-05-27 21:18:00 +0200339for proto in $(intersection "${nodejs_protocols}" "${java_protocols}"); do
340 for trans in $(intersection "${nodejs_transports}" "${java_server_transports}"); do
341 for sock in $(intersection "${nodejs_sockets}" "${java_sockets}"); do
342 case "$sock" in
343 "ip" ) extraparam="";;
344 "ip-ssl" ) extraparam="--ssl";;
345 esac
346 do_test "nodejs-java" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530347 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
348 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
Roger Meier5c6ad242014-05-27 21:18:00 +0200349 "5" "1"
350 done
351 done
352done
353
354######### java client - nodejs server ##############
355for proto in $(intersection "${nodejs_protocols}" "${java_protocols}"); do
356 for trans in $(intersection "${nodejs_transports}" "${java_client_transports}"); do
357 for sock in $(intersection "${nodejs_sockets}" "${java_sockets}"); do
358 case "$sock" in
359 "ip" ) extraparam="";;
360 "ip-ssl" ) extraparam="--ssl";;
361 esac
362 do_test "java-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530363 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
364 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meier5c6ad242014-05-27 21:18:00 +0200365 "5" "2"
366 done
367 done
368done
369
Roger Meier72268b72014-05-28 23:03:57 +0200370######### py client - py server ##############
371for proto in ${py_protocols}; do
372 for trans in ${py_transports}; do
373 for sock in ${py_sockets}; do
374 case "$sock" in
375 "ip" ) extraparam="";;
376 "ip-ssl" ) extraparam="--ssl";;
377 esac
378 do_test "py-py" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530379 "py/TestClient.py --protocol=${proto} --transport={trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
380 "py/TestServer.py --protocol=${proto} --transport={trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200381 "10" "2"
382 done
383 done
384done
385
Roger Meier76150722014-05-31 22:22:07 +0200386for trans in ${py_transports}; do
387 for sock in ${py_sockets}; do
388 case "$sock" in
389 "ip" ) extraparam="";;
390 "ip-ssl" ) extraparam="--ssl";;
391 esac
392 do_test "py-py" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530393 "py/TestClient.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
394 "py/TestServer.py --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200395 "10" "2"
396 do_test "py-py" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530397 "py/TestClient.py --protocol=binary --transport={trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
398 "py/TestServer.py --protocol=accel --transport={trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200399 "10" "2"
400 done
401 done
402
Roger Meier72268b72014-05-28 23:03:57 +0200403######### py client - cpp server ##############
404for proto in $(intersection "${cpp_protocols}" "${py_protocols}"); do
405 for trans in $(intersection "${cpp_transports}" "${py_transports}"); do
406 for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do
407 case "$sock" in
408 "ip" ) extraparam="";;
409 "ip-ssl" ) extraparam="--ssl";;
410 esac
411 do_test "py-cpp" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530412 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
413 "cpp/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200414 "10" "2"
415 done
416 done
417done
418
Roger Meier76150722014-05-31 22:22:07 +0200419for trans in $(intersection "${cpp_transports}" "${py_transports}"); do
420 for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do
421 case "$sock" in
422 "ip" ) extraparam="";;
423 "ip-ssl" ) extraparam="--ssl";;
424 esac
425 do_test "py-cpp" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530426 "py/TestClient.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
427 "cpp/TestServer --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200428 "10" "2"
429 done
430 done
431
Roger Meier72268b72014-05-28 23:03:57 +0200432######### cpp client - py server ##############
433for proto in $(intersection "${cpp_protocols}" "${py_protocols}"); do
434 for trans in $(intersection "${cpp_transports}" "${py_transports}"); do
435 for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do
436 case "$sock" in
437 "ip" ) extraparam="";;
438 "ip-ssl" ) extraparam="--ssl";;
439 esac
440 do_test "cpp-py" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530441 "cpp/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
442 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200443 "10" "2"
444 done
445 done
446done
447
Roger Meier76150722014-05-31 22:22:07 +0200448for trans in $(intersection "${cpp_transports}" "${py_transports}"); do
449 for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do
450 case "$sock" in
451 "ip" ) extraparam="";;
452 "ip-ssl" ) extraparam="--ssl";;
453 esac
454 do_test "cpp-py" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530455 "cpp/TestClient --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
456 "py/TestServer.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200457 "10" "2"
458 done
459 done
460
Roger Meier72268b72014-05-28 23:03:57 +0200461######### py client - java server ##############
Roger Meier72268b72014-05-28 23:03:57 +0200462for proto in $(intersection "${py_protocols}" "${java_protocols}"); do
463 for trans in $(intersection "${py_transports}" "${java_server_transports}"); do
464 for sock in $(intersection "${py_sockets}" "${java_sockets}"); do
465 case "$sock" in
466 "ip" ) extraparam="";;
467 "ip-ssl" ) extraparam="--ssl";;
468 esac
469 do_test "py-java" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530470 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
471 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
Roger Meier72268b72014-05-28 23:03:57 +0200472 "15" "2"
473 done
474 done
475done
476
Roger Meier76150722014-05-31 22:22:07 +0200477for trans in $(intersection "${py_transports}" "${java_server_transports}"); do
478 for sock in $(intersection "${py_sockets}" "${java_sockets}"); do
479 case "$sock" in
480 "ip" ) extraparam="";;
481 "ip-ssl" ) extraparam="--ssl";;
482 esac
483 do_test "py-java" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530484 "py/TestClient.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
485 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
Roger Meier76150722014-05-31 22:22:07 +0200486 "15" "2"
487 done
488 done
489
Roger Meier72268b72014-05-28 23:03:57 +0200490######### java client - py server ##############
491for proto in $(intersection "${py_protocols}" "${java_protocols}"); do
492 for trans in $(intersection "${py_transports}" "${java_client_transports}"); do
493 for sock in $(intersection "${py_sockets}" "${java_sockets}"); do
494 case "$sock" in
495 "ip" ) extraparam="";;
496 "ip-ssl" ) extraparam="--ssl";;
497 esac
498 do_test "java-py" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530499 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
500 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200501 "10" "5"
502 done
503 done
504done
505
Roger Meier76150722014-05-31 22:22:07 +0200506for trans in $(intersection "${py_transports}" "${java_client_transports}"); do
507 for sock in $(intersection "${py_sockets}" "${java_sockets}"); do
508 case "$sock" in
509 "ip" ) extraparam="";;
510 "ip-ssl" ) extraparam="--ssl";;
511 esac
512 do_test "java-py" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530513 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
514 "py/TestServer.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200515 "10" "5"
516 done
517 done
518
Roger Meier72268b72014-05-28 23:03:57 +0200519######### py client - nodejs server ##############
Roger Meier72268b72014-05-28 23:03:57 +0200520for proto in $(intersection "${py_protocols}" "${nodejs_protocols}"); do
521 for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do
522 for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do
523 case "$sock" in
524 "ip" ) extraparam="";;
525 "ip-ssl" ) extraparam="--ssl";;
526 esac
527 do_test "py-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530528 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
529 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200530 "15" "2"
531 done
532 done
533done
534
Roger Meier76150722014-05-31 22:22:07 +0200535for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do
536 for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do
537 case "$sock" in
538 "ip" ) extraparam="";;
539 "ip-ssl" ) extraparam="--ssl";;
540 esac
541 do_test "py-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530542 "py/TestClient.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
543 "node ${NODE_TEST_DIR}/server.js -p binary -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200544 "15" "2"
545 done
546 done
547
Roger Meier72268b72014-05-28 23:03:57 +0200548######### nodejs client - py server ##############
549for proto in $(intersection "${py_protocols}" "${nodejs_protocols}"); do
550 for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do
551 for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do
552 case "$sock" in
553 "ip" ) extraparam="";;
554 "ip-ssl" ) extraparam="--ssl";;
555 esac
556 do_test "nodejs-py" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530557 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
558 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200559 "10" "2"
560 done
561 done
562done
563
Roger Meier76150722014-05-31 22:22:07 +0200564for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do
565 for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do
566 case "$sock" in
567 "ip" ) extraparam="";;
568 "ip-ssl" ) extraparam="--ssl";;
569 esac
570 do_test "nodejs-py" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530571 "node ${NODE_TEST_DIR}/client.js -p binary -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
572 "py/TestServer.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200573 "10" "2"
574 done
575 done
576
Roger Meiera3570ac2014-06-10 22:16:14 +0200577######### ruby client - ruby server ##############
578for proto in ${ruby_protocols}; do
579 for trans in ${ruby_transports}; do
580 for sock in ${ruby_sockets}; do
581 case "$sock" in
582 "ip" ) extraparam="";;
583 "ip-ssl" ) extraparam="--ssl";;
584 esac
585 do_test "ruby-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530586 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
587 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200588 "5" "5"
589 done
590 done
591done
592
593for trans in ${ruby_transports}; do
594 for sock in ${ruby_sockets}; do
595 case "$sock" in
596 "ip" ) extraparam="";;
597 "ip-ssl" ) extraparam="--ssl";;
598 esac
599 do_test "ruby-ruby" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530600 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
601 "ruby rb/integration/TestServer.rb --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200602 "5" "5"
603 do_test "ruby-ruby" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530604 "ruby rb/integration/TestClient.rb --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
605 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200606 "5" "5"
607 done
608 done
609
610######### ruby client - cpp server ##############
611for proto in $(intersection "${cpp_protocols}" "${ruby_protocols}"); do
612 for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
613 for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
614 case "$sock" in
615 "ip" ) extraparam="";;
616 "ip-ssl" ) extraparam="--ssl";;
617 esac
618 do_test "ruby-cpp" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530619 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
620 "cpp/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200621 "5" "5"
622 done
623 done
624done
625
626for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
627 for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
628 case "$sock" in
629 "ip" ) extraparam="";;
630 "ip-ssl" ) extraparam="--ssl";;
631 esac
632 do_test "ruby-cpp" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530633 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
634 "cpp/TestServer --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200635 "5" "5"
636 done
637 done
638
639######### cpp client - ruby server ##############
640for proto in $(intersection "${cpp_protocols}" "${ruby_protocols}"); do
641 for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
642 for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
643 case "$sock" in
644 "ip" ) extraparam="";;
645 "ip-ssl" ) extraparam="--ssl";;
646 esac
647 do_test "cpp-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530648 "cpp/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} ${extraparam}" \
649 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200650 "5" "5"
651 done
652 done
653done
654
655for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
656 for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
657 case "$sock" in
658 "ip" ) extraparam="";;
659 "ip-ssl" ) extraparam="--ssl";;
660 esac
661 do_test "cpp-ruby" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530662 "cpp/TestClient --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} ${extraparam}" \
663 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200664 "5" "5"
665 done
666 done
667
668######### ruby client - java server ##############
669for proto in $(intersection "${ruby_protocols}" "${java_protocols}"); do
670 for trans in $(intersection "${ruby_transports}" "${java_server_transports}"); do
671 for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
672 case "$sock" in
673 "ip" ) extraparam="";;
674 "ip-ssl" ) extraparam="--ssl";;
675 esac
676 do_test "ruby-java" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530677 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
678 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200679 "15" "5"
680 done
681 done
682done
683
684for trans in $(intersection "${ruby_transports}" "${java_server_transports}"); do
685 for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
686 case "$sock" in
687 "ip" ) extraparam="";;
688 "ip-ssl" ) extraparam="--ssl";;
689 esac
690 do_test "ruby-java" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530691 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
692 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200693 "15" "5"
694 done
695 done
696
697######### java client - ruby server ##############
698for proto in $(intersection "${ruby_protocols}" "${java_protocols}"); do
699 for trans in $(intersection "${ruby_transports}" "${java_client_transports}"); do
700 for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
701 case "$sock" in
702 "ip" ) extraparam="";;
703 "ip-ssl" ) extraparam="--ssl";;
704 esac
705 do_test "java-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530706 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
707 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200708 "10" "5"
709 done
710 done
711done
712
713for trans in $(intersection "${ruby_transports}" "${java_client_transports}"); do
714 for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
715 case "$sock" in
716 "ip" ) extraparam="";;
717 "ip-ssl" ) extraparam="--ssl";;
718 esac
719 do_test "java-ruby" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530720 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
721 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200722 "10" "5"
723 done
724 done
725
726######### ruby client - nodejs server ##############
727for proto in $(intersection "${ruby_protocols}" "${nodejs_protocols}"); do
728 for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
729 for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
730 case "$sock" in
731 "ip" ) extraparam="";;
732 "ip-ssl" ) extraparam="--ssl";;
733 esac
734 do_test "ruby-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530735 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
736 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200737 "5" "2"
738 done
739 done
740done
741
742for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
743 for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
744 case "$sock" in
745 "ip" ) extraparam="";;
746 "ip-ssl" ) extraparam="--ssl";;
747 esac
748 do_test "ruby-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530749 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
750 "node ${NODE_TEST_DIR}/server.js -p binary -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200751 "5" "2"
752 done
753 done
754
755######### nodejs client - ruby server ##############
756for proto in $(intersection "${ruby_protocols}" "${nodejs_protocols}"); do
757 for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
758 for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
759 case "$sock" in
760 "ip" ) extraparam="";;
761 "ip-ssl" ) extraparam="--ssl";;
762 esac
763 do_test "nodejs-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530764 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
765 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200766 "10" "5"
767 done
768 done
769done
770
771for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
772 for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
773 case "$sock" in
774 "ip" ) extraparam="";;
775 "ip-ssl" ) extraparam="--ssl";;
776 esac
777 do_test "nodejs-ruby" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530778 "node ${NODE_TEST_DIR}/client.js -p binary -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
779 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200780 "10" "2"
781 done
782 done
783
cdwijayarathnad9217912014-08-15 22:18:30 +0530784######### py client - ruby server ##############
Roger Meiera3570ac2014-06-10 22:16:14 +0200785for proto in $(intersection "${py_protocols}" "${ruby_protocols}"); do
786 for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
787 for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
788 case "$sock" in
789 "ip" ) extraparam="";;
790 "ip-ssl" ) extraparam="--ssl";;
791 esac
792 do_test "py-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530793 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
794 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200795 "15" "5"
796 done
797 done
798done
799
800for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
801 for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
802 case "$sock" in
803 "ip" ) extraparam="";;
804 "ip-ssl" ) extraparam="--ssl";;
805 esac
806 do_test "py-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530807 "py/TestClient.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
808 "ruby rb/integration/TestServer.rb --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200809 "15" "5"
810 do_test "py-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530811 "py/TestClient.py --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
812 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200813 "15" "5"
814 done
815 done
816
817######### ruby client - py server ##############
818for proto in $(intersection "${py_protocols}" "${ruby_protocols}"); do
819 for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
820 for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
821 case "$sock" in
822 "ip" ) extraparam="";;
823 "ip-ssl" ) extraparam="--ssl";;
824 esac
825 do_test "ruby-py" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530826 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
827 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200828 "5" "2"
829 done
830 done
831done
832
833for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
834 for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
835 case "$sock" in
836 "ip" ) extraparam="";;
837 "ip-ssl" ) extraparam="--ssl";;
838 esac
839 do_test "ruby-py" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530840 "ruby rb/integration/TestClient.rb --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
841 "py/TestServer.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200842 "5" "2"
843 do_test "ruby-py" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530844 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
845 "py/TestServer.py --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200846 "5" "2"
847 done
848 done
849
cdwijayarathnad9217912014-08-15 22:18:30 +0530850######### hs client - hs server ###############
851for proto in $hs_protocols; do
852 for trans in $hs_transports; do
853 for sock in $hs_sockets; do
854 case "$sock" in
855 "ip" ) extraparam="";;
856 "ip-ssl" ) extraparam="--ssl";;
857 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
858 esac
859 do_test "hs-hs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530860 "hs/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
861 "hs/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530862 "2" "0.1"
863 done
864 done
865done
866
867######### hs client - cpp server ###############
868for proto in $(intersection "${hs_protocols}" "${cpp_protocols}"); do
869 for trans in $(intersection "${hs_transports}" "${cpp_transports}"); do
870 for sock in $(intersection "${hs_sockets}" "${cpp_sockets}"); do
871 case "$sock" in
872 "ip" ) extraparam="";;
873 "ip-ssl" ) extraparam="--ssl";;
874 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
875 esac
876 do_test "hs-cpp" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530877 "hs/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
878 "cpp/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530879 "2" "0.1"
880 done
881 done
882done
883
884######### cpp client - hs server ###############
885for proto in $(intersection "${hs_protocols}" "${cpp_protocols}"); do
886 for trans in $(intersection "${hs_transports}" "${cpp_transports}"); do
887 for sock in $(intersection "${hs_sockets}" "${cpp_sockets}"); do
888 case "$sock" in
889 "ip" ) extraparam="";;
890 "ip-ssl" ) extraparam="--ssl";;
891 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
892 esac
893 do_test "cpp-hs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530894 "cpp/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
895 "hs/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530896 "2" "0.1"
897 done
898 done
899done
900
901######### hs client - java server ###############
902for proto in $(intersection "${hs_protocols}" "${java_protocols}"); do
903 for trans in $(intersection "${hs_transports}" "${java_transports}"); do
904 for sock in $(intersection "${hs_sockets}" "${java_sockets}"); do
905 case "$sock" in
906 "ip" ) extraparam="";;
907 "ip-ssl" ) extraparam="--ssl";;
908 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
909 esac
910 do_test "hs-java" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530911 "hs/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
912 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530913 "5" "1"
914 done
915 done
916done
917
918######### java client - hs server ###############
919for proto in $(intersection "${hs_protocols}" "${java_protocols}"); do
920 for trans in $(intersection "${hs_transports}" "${java_transports}"); do
921 for sock in $(intersection "${hs_sockets}" "${java_sockets}"); do
922 case "$sock" in
923 "ip" ) extraparam="";;
924 "ip-ssl" ) extraparam="--ssl";;
925 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
926 esac
927 do_test "java-hs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530928 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
929 "hs/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530930 "5" "1"
931 done
932 done
933done
934
935######### py client -hs server ##############
936for proto in $(intersection "${hs_protocols}" "${py_protocols}"); do
937 for trans in $(intersection "${hs_transports}" "${py_transports}"); do
938 for sock in $(intersection "${hs_sockets}" "${py_sockets}"); do
939 case "$sock" in
940 "ip" ) extraparam="";;
941 "ip-ssl" ) extraparam="--ssl";;
942 esac
943 do_test "py-hs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530944 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
945 "hs/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530946 "10" "2"
947 done
948 done
949done
950
951for trans in $(intersection "${hs_transports}" "${py_transports}"); do
952 for sock in $(intersection "${hs_sockets}" "${py_sockets}"); do
953 case "$sock" in
954 "ip" ) extraparam="";;
955 "ip-ssl" ) extraparam="--ssl";;
956 esac
957 do_test "py-hs" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530958 "py/TestClient.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
959 "hs/TestServer --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530960 "10" "2"
961 done
962 done
963
964######### hs client - py server ##############
965for proto in $(intersection "${hs_protocols}" "${py_protocols}"); do
966 for trans in $(intersection "${hs_transports}" "${py_transports}"); do
967 for sock in $(intersection "${hs_sockets}" "${py_sockets}"); do
968 case "$sock" in
969 "ip" ) extraparam="";;
970 "ip-ssl" ) extraparam="--ssl";;
971 esac
972 do_test "hs-py" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530973 "hs/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
974 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530975 "10" "2"
976 done
977 done
978done
979
980for trans in $(intersection "${hs_transports}" "${py_transports}"); do
981 for sock in $(intersection "${hs_sockets}" "${py_sockets}"); do
982 case "$sock" in
983 "ip" ) extraparam="";;
984 "ip-ssl" ) extraparam="--ssl";;
985 esac
986 do_test "hs-py" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530987 "hs/TestClient --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
988 "py/TestServer.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530989 "10" "2"
990 done
991 done
992
993######### nodejs client - hs server ##############
994for proto in $(intersection "${nodejs_protocols}" "${hs_protocols}"); do
995 for trans in $(intersection "${nodejs_transports}" "${hs_transports}"); do
996 for sock in $(intersection "${nodejs_sockets}" "${hs_sockets}"); do
997 case "$sock" in
998 "ip" ) extraparam="";;
999 "ip-ssl" ) extraparam="--ssl";;
1000 esac
1001 do_test "nodejs-hs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301002 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1003 "hs/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301004 "5" "0.2"
1005 done
1006 done
1007done
1008
1009######### hs client - nodejs server ##############
1010for proto in $(intersection "${nodejs_protocols}" "${hs_protocols}"); do
1011 for trans in $(intersection "${nodejs_transports}" "${hs_transports}"); do
1012 for sock in $(intersection "${nodejs_sockets}" "${hs_sockets}"); do
1013 case "$sock" in
1014 "ip" ) extraparam="";;
1015 "ip-ssl" ) extraparam="--ssl";;
1016 esac
1017 do_test "hs-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301018 "hs/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1019 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301020 "5" "2"
1021 done
1022 done
1023done
1024
1025######### ruby client - hs server ##############
1026for proto in $(intersection "${hs_protocols}" "${ruby_protocols}"); do
1027 for trans in $(intersection "${hs_transports}" "${ruby_transports}"); do
1028 for sock in $(intersection "${hs_sockets}" "${ruby_sockets}"); do
1029 case "$sock" in
1030 "ip" ) extraparam="";;
1031 "ip-ssl" ) extraparam="--ssl";;
1032 esac
1033 do_test "ruby-hs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301034 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1035 "hs/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301036 "5" "5"
1037 done
1038 done
1039done
1040
1041for trans in $(intersection "${hs_transports}" "${ruby_transports}"); do
1042 for sock in $(intersection "${hs_sockets}" "${ruby_sockets}"); do
1043 case "$sock" in
1044 "ip" ) extraparam="";;
1045 "ip-ssl" ) extraparam="--ssl";;
1046 esac
1047 do_test "ruby-cpp" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301048 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam} ${extraparam}" \
1049 "hs/TestServer --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301050 "5" "5"
1051 done
1052 done
1053
1054######### hs client - ruby server ##############
1055for proto in $(intersection "${hs_protocols}" "${ruby_protocols}"); do
1056 for trans in $(intersection "${hs_transports}" "${ruby_transports}"); do
1057 for sock in $(intersection "${hs_sockets}" "${ruby_sockets}"); do
1058 case "$sock" in
1059 "ip" ) extraparam="";;
1060 "ip-ssl" ) extraparam="--ssl";;
1061 esac
1062 do_test "hs-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301063 "hs/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1064 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301065 "5" "5"
1066 done
1067 done
1068done
1069
1070for trans in $(intersection "${hs_transports}" "${ruby_transports}"); do
1071 for sock in $(intersection "${hs_sockets}" "${ruby_sockets}"); do
1072 case "$sock" in
1073 "ip" ) extraparam="";;
1074 "ip-ssl" ) extraparam="--ssl";;
1075 esac
1076 do_test "hs-ruby" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301077 "hs/TestClient --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1078 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301079 "5" "5"
1080 done
1081 done
1082
Roger Meiera3570ac2014-06-10 22:16:14 +02001083
Roger Meier691ec002012-11-02 07:50:24 +00001084# delete Unix Domain Socket used by cpp tests
1085rm -f /tmp/ThriftTest.thrift
1086
Jens Geyerc1d79432014-04-22 22:52:43 +02001087######### csharp client - csharp server #############
1088export MONO_PATH=../lib/csharp
1089for proto in $csharp_protocols; do
1090 for trans in $csharp_transports; do
1091 for sock in $csharp_sockets; do
1092 case "$sock" in
1093 "ip" ) extraparam="";;
1094 "ip-ssl" ) extraparam="--ssl";;
1095 esac
1096 do_test "csharp-csharp" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301097 "../lib/csharp/test/ThriftTest/TestClientServer.exe client --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1098 "../lib/csharp/test/ThriftTest/TestClientServer.exe server --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
henriqued5aba4c2014-04-30 18:11:11 +02001099 "5" "1"
Jens Geyerc1d79432014-04-22 22:52:43 +02001100 done
1101 done
1102done
1103
Roger Meier4edac7f2014-05-02 21:07:01 +02001104do_test "js-java" "json" "http-ip" \
Roger Meier4d5157d2012-01-09 21:23:19 +00001105 "" \
1106 "ant -f ../lib/js/test/build.xml unittest" \
henriqued17f1c92014-04-30 16:21:25 +02001107 "2" "2"
Roger Meier4d5157d2012-01-09 21:23:19 +00001108do_test "perl-cpp" "binary" "buffered-ip" \
Roger Meier01b568c2012-01-10 21:30:02 +00001109 "perl -I perl/gen-perl/ -I../lib/perl/lib/ perl/TestClient.pl" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301110 "cpp/TestServer --port=${THRIFT_TEST_PORT}" \
henriqued5aba4c2014-04-30 18:11:11 +02001111 "10" "2"
Roger Meierb33967b2012-01-21 09:18:05 +00001112do_test "php-cpp" "binary" "buffered-ip" \
1113 "make -C php/ client" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301114 "cpp/TestServer --port=${THRIFT_TEST_PORT}" \
henriqued5aba4c2014-04-30 18:11:11 +02001115 "10" "2"
Roger Meier4edac7f2014-05-02 21:07:01 +02001116
1117echo " failed tests are logged to test/log/error.log"
Roger Meiercc0fe272014-05-16 23:18:25 +02001118echo " full log is here test/log/client_server_protocol_transport_client.log"
1119echo " full log is here test/log/client_server_protocol_transport_server.log"
1120echo " or look at file://$BASEDIR/$STATUS_HTML"
1121
henriquead4df162014-05-20 13:18:45 +02001122ELAPSED_TIME=$(echo "(${SECONDS} - ${START_TIME})" | bc)
1123DURATION="${ELAPSED_TIME} seconds"
Roger Meierbea27342014-08-08 00:30:50 +02001124
1125echo $FAILED failed of $TESTCOUNT tests in total
Roger Meiercc0fe272014-05-16 23:18:25 +02001126echo "test an took" $DURATION
1127print_html_footer "$DURATION"
1128
Roger Meier4edac7f2014-05-02 21:07:01 +02001129date
Roger Meier82525772012-11-16 00:38:27 +00001130cd -