blob: 0eeefe519639523a15aeb48cadc4d06f03e6a0bb [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
Roger Meier4d5157d2012-01-09 21:23:19 +0000119
120 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}
henriqued17f1c92014-04-30 16:21:25 +0200123
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=$!
126
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"
168date
henriqued17f1c92014-04-30 16:21:25 +0200169
henriqued17f1c92014-04-30 16:21:25 +0200170
Roger Meier4d5157d2012-01-09 21:23:19 +0000171echo "======================================================"
172
173rm -rf log
174mkdir -p log
175
Roger Meiercc0fe272014-05-16 23:18:25 +0200176
Roger Meier4d5157d2012-01-09 21:23:19 +0000177print_header
Roger Meiercc0fe272014-05-16 23:18:25 +0200178print_html_header
179
180ant -f ../lib/java/build.xml compile-test 1>/dev/null
181
Roger Meier4d5157d2012-01-09 21:23:19 +0000182
Roger Meier82525772012-11-16 00:38:27 +0000183#TODO add enum for parameters
184#TODO align program arguments across languages
Roger Meier4d5157d2012-01-09 21:23:19 +0000185
Roger Meier023192f2014-02-12 09:35:12 +0100186cpp_protocols="binary compact json"
187java_protocols="binary compact json"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100188cpp_transports="buffered framed http"
189java_server_transports="buffered framed fastframed"
190java_client_transports=${java_server_transports}" http"
Roger Meier5829a2c2014-04-08 00:28:17 +0200191cpp_sockets="ip domain ip-ssl"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100192java_sockets="ip ip-ssl"
193# TODO fastframed java transport is another implementation of framed transport
Roger Meier4d5157d2012-01-09 21:23:19 +0000194
Roger Meierd9b331d2014-05-25 22:59:17 +0200195nodejs_protocols="binary compact json"
Roger Meier8909cbd2014-01-26 11:44:27 +0100196nodejs_transports="buffered framed"
Roger Meier57b354b2014-02-22 01:01:58 +0100197nodejs_sockets="ip ip-ssl"
Roger Meiereaa61d82012-01-12 21:38:29 +0000198
Jens Geyerc1d79432014-04-22 22:52:43 +0200199csharp_protocols="binary compact json"
200csharp_transports="buffered framed"
201csharp_sockets="ip ip-ssl"
202
Roger Meier72268b72014-05-28 23:03:57 +0200203py_protocols="binary compact json accel"
Roger Meier76150722014-05-31 22:22:07 +0200204py_transports="buffered framed"
205py_sockets="ip ip-ssl"
Roger Meier72268b72014-05-28 23:03:57 +0200206
Roger Meiera3570ac2014-06-10 22:16:14 +0200207ruby_protocols="binary compact json accel"
208ruby_transports="buffered framed"
209ruby_sockets="ip"
210
Noam Zilbersteinaf5d64a2014-07-31 15:44:13 -0700211hs_protocols="binary compact json"
212hs_transports="buffered"
213hs_sockets="ip"
214
Roger Meierf42ce2a2013-01-16 22:12:14 +0100215######### java client - java server #############
216for proto in $java_protocols; do
217 for trans in $java_server_transports; do
218 for sock in $java_sockets; do
219 case "$sock" in
220 "ip" ) extraparam="";;
221 "ip-ssl" ) extraparam="--ssl";;
222 esac
223 do_test "java-java" "${proto}" "${trans}-${sock}" \
henriqued5aba4c2014-04-30 18:11:11 +0200224 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \
225 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \
226 "5" "1"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100227 done
228 done
229done
230
231######### cpp client - cpp server ###############
232for proto in $cpp_protocols; do
233 for trans in $cpp_transports; do
234 for sock in $cpp_sockets; do
Roger Meier4d5157d2012-01-09 21:23:19 +0000235 case "$sock" in
236 "ip" ) extraparam="";;
237 "ip-ssl" ) extraparam="--ssl";;
238 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
239 esac
240 do_test "cpp-cpp" "${proto}" "${trans}-${sock}" \
241 "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \
242 "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \
henriqued5aba4c2014-04-30 18:11:11 +0200243 "2" "0.1"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100244 done
245 done
246done
247
henriqued17f1c92014-04-30 16:21:25 +0200248
Roger Meierf42ce2a2013-01-16 22:12:14 +0100249######### java client - cpp server ##############
250# warning: ssl over http is not supported in java client!
251for proto in $(intersection "${java_protocols}" "${cpp_protocols}"); do
252 for trans in $(intersection "${java_client_transports}" "${cpp_transports}"); do
253 for sock in $(intersection "${java_sockets}" "${cpp_sockets}"); do
254 case "$sock" in
255 "ip" ) extraparam="";;
256 "ip-ssl" ) extraparam="--ssl";;
257 esac
Roger Meier188024e2014-04-17 21:53:45 +0200258 do_test "java-cpp" "${proto}" "${trans}-${sock}" \
henriqued5aba4c2014-04-30 18:11:11 +0200259 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \
Roger Meierf42ce2a2013-01-16 22:12:14 +0100260 "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}"\
henriqued5aba4c2014-04-30 18:11:11 +0200261 "5" "0.1"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100262 done
263 done
264done
265
266######### cpp client - java server ##############
267for proto in $(intersection "${cpp_protocols}" "${java_protocols}"); do
268 for trans in $(intersection "${cpp_transports}" "${java_server_transports}"); do
269 for sock in $(intersection "${java_sockets}" "${cpp_sockets}"); do
270 case "$sock" in
271 "ip" ) extraparam="";;
272 "ip-ssl" ) extraparam="--ssl";;
273 esac
Roger Meier188024e2014-04-17 21:53:45 +0200274 do_test "cpp-java" "${proto}" "${trans}-${sock}" \
275 "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \
henriqued5aba4c2014-04-30 18:11:11 +0200276 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \
277 "5" "1"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100278 done
279 done
280done
Roger Meier4d5157d2012-01-09 21:23:19 +0000281
Roger Meier8909cbd2014-01-26 11:44:27 +0100282
henriqued17f1c92014-04-30 16:21:25 +0200283NODE_TEST_DIR=${BASEDIR}/../lib/nodejs/test
Roger Meier8909cbd2014-01-26 11:44:27 +0100284export NODE_PATH=${NODE_TEST_DIR}:${NODE_TEST_DIR}/../lib:${NODE_PATH}
Roger Meierd9b331d2014-05-25 22:59:17 +0200285######### nodejs client - nodejs server ##############
Roger Meierd9b331d2014-05-25 22:59:17 +0200286for proto in ${nodejs_protocols}; do
287 for trans in ${nodejs_transports}; do
288 for sock in ${nodejs_sockets}; do
289 case "$sock" in
290 "ip" ) extraparam="";;
291 "ip-ssl" ) extraparam="--ssl";;
292 esac
293 do_test "nodejs-nodejs" "${proto}" "${trans}-${sock}" \
294 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \
295 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \
296 "5" "0.2"
297 done
298 done
299done
henriqued5aba4c2014-04-30 18:11:11 +0200300
Roger Meier8909cbd2014-01-26 11:44:27 +0100301######### nodejs client - cpp server ##############
Roger Meier8909cbd2014-01-26 11:44:27 +0100302for proto in $(intersection "${nodejs_protocols}" "${cpp_protocols}"); do
303 for trans in $(intersection "${nodejs_transports}" "${cpp_transports}"); do
304 for sock in $(intersection "${nodejs_sockets}" "${cpp_sockets}"); do
Roger Meier57b354b2014-02-22 01:01:58 +0100305 case "$sock" in
306 "ip" ) extraparam="";;
307 "ip-ssl" ) extraparam="--ssl";;
308 esac
henriqued17f1c92014-04-30 16:21:25 +0200309 do_test "nodejs-cpp" "${proto}" "${trans}-${sock}" \
310 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \
Roger Meier8909cbd2014-01-26 11:44:27 +0100311 "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \
henriqued5aba4c2014-04-30 18:11:11 +0200312 "5" "0.2"
Roger Meier8909cbd2014-01-26 11:44:27 +0100313 done
314 done
315done
316
317######### cpp client - nodejs server ##############
318for proto in $(intersection "${nodejs_protocols}" "${cpp_protocols}"); do
319 for trans in $(intersection "${nodejs_transports}" "${cpp_transports}"); do
320 for sock in $(intersection "${nodejs_sockets}" "${cpp_sockets}"); do
Roger Meier57b354b2014-02-22 01:01:58 +0100321 case "$sock" in
322 "ip" ) extraparam="";;
323 "ip-ssl" ) extraparam="--ssl";;
324 esac
henriqued17f1c92014-04-30 16:21:25 +0200325 do_test "cpp-nodejs" "${proto}" "${trans}-${sock}" \
Roger Meier57b354b2014-02-22 01:01:58 +0100326 "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \
henriqued17f1c92014-04-30 16:21:25 +0200327 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \
henriqued5aba4c2014-04-30 18:11:11 +0200328 "5" "2"
Roger Meier8909cbd2014-01-26 11:44:27 +0100329 done
330 done
331done
332
Roger Meier5c6ad242014-05-27 21:18:00 +0200333######### nodejs client - java server ##############
Roger Meier5c6ad242014-05-27 21:18:00 +0200334for proto in $(intersection "${nodejs_protocols}" "${java_protocols}"); do
335 for trans in $(intersection "${nodejs_transports}" "${java_server_transports}"); do
336 for sock in $(intersection "${nodejs_sockets}" "${java_sockets}"); do
337 case "$sock" in
338 "ip" ) extraparam="";;
339 "ip-ssl" ) extraparam="--ssl";;
340 esac
341 do_test "nodejs-java" "${proto}" "${trans}-${sock}" \
342 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \
343 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \
344 "5" "1"
345 done
346 done
347done
348
349######### java client - nodejs server ##############
350for proto in $(intersection "${nodejs_protocols}" "${java_protocols}"); do
351 for trans in $(intersection "${nodejs_transports}" "${java_client_transports}"); do
352 for sock in $(intersection "${nodejs_sockets}" "${java_sockets}"); do
353 case "$sock" in
354 "ip" ) extraparam="";;
355 "ip-ssl" ) extraparam="--ssl";;
356 esac
357 do_test "java-nodejs" "${proto}" "${trans}-${sock}" \
358 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \
359 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \
360 "5" "2"
361 done
362 done
363done
364
Roger Meier72268b72014-05-28 23:03:57 +0200365######### py client - py server ##############
366for proto in ${py_protocols}; do
367 for trans in ${py_transports}; do
368 for sock in ${py_sockets}; do
369 case "$sock" in
370 "ip" ) extraparam="";;
371 "ip-ssl" ) extraparam="--ssl";;
372 esac
373 do_test "py-py" "${proto}" "${trans}-${sock}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530374 "py/TestClient.py --protocol=${proto} --transport={trans} --port=9090 --host=localhost --genpydir=gen-py ${extraparam}" \
375 "py/TestServer.py --protocol=${proto} --transport={trans} --port=9090 --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200376 "10" "2"
377 done
378 done
379done
380
Roger Meier76150722014-05-31 22:22:07 +0200381for trans in ${py_transports}; do
382 for sock in ${py_sockets}; do
383 case "$sock" in
384 "ip" ) extraparam="";;
385 "ip-ssl" ) extraparam="--ssl";;
386 esac
387 do_test "py-py" "accel-binary" "${trans}-${sock}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530388 "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=gen-py ${extraparam}" \
389 "py/TestServer.py --protocol=binary --transport=${trans} --port=9090 --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200390 "10" "2"
391 do_test "py-py" "binary-accel" "${trans}-${sock}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530392 "py/TestClient.py --protocol=binary --transport={trans} --port=9090 --host=localhost --genpydir=gen-py ${extraparam}" \
393 "py/TestServer.py --protocol=accel --transport={trans} --port=9090 --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200394 "10" "2"
395 done
396 done
397
Roger Meier72268b72014-05-28 23:03:57 +0200398######### py client - cpp server ##############
399for proto in $(intersection "${cpp_protocols}" "${py_protocols}"); do
400 for trans in $(intersection "${cpp_transports}" "${py_transports}"); do
401 for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do
402 case "$sock" in
403 "ip" ) extraparam="";;
404 "ip-ssl" ) extraparam="--ssl";;
405 esac
406 do_test "py-cpp" "${proto}" "${trans}-${sock}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530407 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=9090 --host=localhost --genpydir=gen-py ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200408 "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \
409 "10" "2"
410 done
411 done
412done
413
Roger Meier76150722014-05-31 22:22:07 +0200414for trans in $(intersection "${cpp_transports}" "${py_transports}"); do
415 for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do
416 case "$sock" in
417 "ip" ) extraparam="";;
418 "ip-ssl" ) extraparam="--ssl";;
419 esac
420 do_test "py-cpp" "accel-binary" "${trans}-${sock}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530421 "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=gen-py ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200422 "cpp/TestServer --protocol=binary --transport=${trans} ${extraparam}" \
423 "10" "2"
424 done
425 done
426
Roger Meier72268b72014-05-28 23:03:57 +0200427######### cpp client - py server ##############
428for proto in $(intersection "${cpp_protocols}" "${py_protocols}"); do
429 for trans in $(intersection "${cpp_transports}" "${py_transports}"); do
430 for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do
431 case "$sock" in
432 "ip" ) extraparam="";;
433 "ip-ssl" ) extraparam="--ssl";;
434 esac
435 do_test "cpp-py" "${proto}" "${trans}-${sock}" \
436 "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530437 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=9090 --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200438 "10" "2"
439 done
440 done
441done
442
Roger Meier76150722014-05-31 22:22:07 +0200443for trans in $(intersection "${cpp_transports}" "${py_transports}"); do
444 for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do
445 case "$sock" in
446 "ip" ) extraparam="";;
447 "ip-ssl" ) extraparam="--ssl";;
448 esac
449 do_test "cpp-py" "binary-accel" "${trans}-${sock}" \
450 "cpp/TestClient --protocol=binary --transport=${trans} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530451 "py/TestServer.py --protocol=accel --transport=${trans} --port=9090 --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200452 "10" "2"
453 done
454 done
455
Roger Meier72268b72014-05-28 23:03:57 +0200456######### py client - java server ##############
Roger Meier72268b72014-05-28 23:03:57 +0200457for proto in $(intersection "${py_protocols}" "${java_protocols}"); do
458 for trans in $(intersection "${py_transports}" "${java_server_transports}"); do
459 for sock in $(intersection "${py_sockets}" "${java_sockets}"); do
460 case "$sock" in
461 "ip" ) extraparam="";;
462 "ip-ssl" ) extraparam="--ssl";;
463 esac
464 do_test "py-java" "${proto}" "${trans}-${sock}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530465 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=9090 --host=localhost --genpydir=gen-py ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200466 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \
467 "15" "2"
468 done
469 done
470done
471
Roger Meier76150722014-05-31 22:22:07 +0200472for trans in $(intersection "${py_transports}" "${java_server_transports}"); do
473 for sock in $(intersection "${py_sockets}" "${java_sockets}"); do
474 case "$sock" in
475 "ip" ) extraparam="";;
476 "ip-ssl" ) extraparam="--ssl";;
477 esac
478 do_test "py-java" "accel-binary" "${trans}-${sock}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530479 "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=gen-py ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200480 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} ${extraparam}\" run-testserver" \
481 "15" "2"
482 done
483 done
484
Roger Meier72268b72014-05-28 23:03:57 +0200485######### java client - py server ##############
486for proto in $(intersection "${py_protocols}" "${java_protocols}"); do
487 for trans in $(intersection "${py_transports}" "${java_client_transports}"); do
488 for sock in $(intersection "${py_sockets}" "${java_sockets}"); do
489 case "$sock" in
490 "ip" ) extraparam="";;
491 "ip-ssl" ) extraparam="--ssl";;
492 esac
493 do_test "java-py" "${proto}" "${trans}-${sock}" \
494 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530495 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=9090 --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200496 "10" "5"
497 done
498 done
499done
500
Roger Meier76150722014-05-31 22:22:07 +0200501for trans in $(intersection "${py_transports}" "${java_client_transports}"); do
502 for sock in $(intersection "${py_sockets}" "${java_sockets}"); do
503 case "$sock" in
504 "ip" ) extraparam="";;
505 "ip-ssl" ) extraparam="--ssl";;
506 esac
507 do_test "java-py" "binary-accel" "${trans}-${sock}" \
508 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} ${extraparam}\" run-testclient" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530509 "py/TestServer.py --protocol=accel --transport=${trans} --port=9090 --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200510 "10" "5"
511 done
512 done
513
Roger Meier72268b72014-05-28 23:03:57 +0200514######### py client - nodejs server ##############
Roger Meier72268b72014-05-28 23:03:57 +0200515for proto in $(intersection "${py_protocols}" "${nodejs_protocols}"); do
516 for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do
517 for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do
518 case "$sock" in
519 "ip" ) extraparam="";;
520 "ip-ssl" ) extraparam="--ssl";;
521 esac
522 do_test "py-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530523 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=9090 --host=localhost --genpydir=gen-py ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200524 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \
525 "15" "2"
526 done
527 done
528done
529
Roger Meier76150722014-05-31 22:22:07 +0200530for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do
531 for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do
532 case "$sock" in
533 "ip" ) extraparam="";;
534 "ip-ssl" ) extraparam="--ssl";;
535 esac
536 do_test "py-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530537 "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=gen-py ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200538 "node ${NODE_TEST_DIR}/server.js -p binary -t ${trans} ${extraparam}" \
539 "15" "2"
540 done
541 done
542
Roger Meier72268b72014-05-28 23:03:57 +0200543######### nodejs client - py server ##############
544for proto in $(intersection "${py_protocols}" "${nodejs_protocols}"); do
545 for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do
546 for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do
547 case "$sock" in
548 "ip" ) extraparam="";;
549 "ip-ssl" ) extraparam="--ssl";;
550 esac
551 do_test "nodejs-py" "${proto}" "${trans}-${sock}" \
552 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530553 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=9090 --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200554 "10" "2"
555 done
556 done
557done
558
Roger Meier76150722014-05-31 22:22:07 +0200559for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do
560 for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do
561 case "$sock" in
562 "ip" ) extraparam="";;
563 "ip-ssl" ) extraparam="--ssl";;
564 esac
565 do_test "nodejs-py" "binary-accel" "${trans}-${sock}" \
566 "node ${NODE_TEST_DIR}/client.js -p binary -t ${trans} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530567 "py/TestServer.py --protocol=accel --transport=${trans} --port=9090 --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200568 "10" "2"
569 done
570 done
571
Roger Meiera3570ac2014-06-10 22:16:14 +0200572######### ruby client - ruby server ##############
573for proto in ${ruby_protocols}; do
574 for trans in ${ruby_transports}; do
575 for sock in ${ruby_sockets}; do
576 case "$sock" in
577 "ip" ) extraparam="";;
578 "ip-ssl" ) extraparam="--ssl";;
579 esac
580 do_test "ruby-ruby" "${proto}" "${trans}-${sock}" \
581 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=9091" \
582 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=9091" \
583 "5" "5"
584 done
585 done
586done
587
588for trans in ${ruby_transports}; do
589 for sock in ${ruby_sockets}; do
590 case "$sock" in
591 "ip" ) extraparam="";;
592 "ip-ssl" ) extraparam="--ssl";;
593 esac
594 do_test "ruby-ruby" "accel-binary" "${trans}-${sock}" \
595 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=9091" \
596 "ruby rb/integration/TestServer.rb --protocol=binary --transport=${trans} --port=9091" \
597 "5" "5"
598 do_test "ruby-ruby" "binary-accel" "${trans}-${sock}" \
599 "ruby rb/integration/TestClient.rb --protocol=binary --transport=${trans} --port=9091" \
600 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=9091" \
601 "5" "5"
602 done
603 done
604
605######### ruby client - cpp server ##############
606for proto in $(intersection "${cpp_protocols}" "${ruby_protocols}"); do
607 for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
608 for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
609 case "$sock" in
610 "ip" ) extraparam="";;
611 "ip-ssl" ) extraparam="--ssl";;
612 esac
613 do_test "ruby-cpp" "${proto}" "${trans}-${sock}" \
614 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \
615 "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \
616 "5" "5"
617 done
618 done
619done
620
621for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
622 for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
623 case "$sock" in
624 "ip" ) extraparam="";;
625 "ip-ssl" ) extraparam="--ssl";;
626 esac
627 do_test "ruby-cpp" "accel-binary" "${trans}-${sock}" \
628 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \
629 "cpp/TestServer --protocol=binary --transport=${trans} ${extraparam}" \
630 "5" "5"
631 done
632 done
633
634######### cpp client - ruby server ##############
635for proto in $(intersection "${cpp_protocols}" "${ruby_protocols}"); do
636 for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
637 for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
638 case "$sock" in
639 "ip" ) extraparam="";;
640 "ip-ssl" ) extraparam="--ssl";;
641 esac
642 do_test "cpp-ruby" "${proto}" "${trans}-${sock}" \
643 "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \
644 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \
645 "5" "5"
646 done
647 done
648done
649
650for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
651 for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
652 case "$sock" in
653 "ip" ) extraparam="";;
654 "ip-ssl" ) extraparam="--ssl";;
655 esac
656 do_test "cpp-ruby" "binary-accel" "${trans}-${sock}" \
657 "cpp/TestClient --protocol=binary --transport=${trans} ${extraparam}" \
658 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \
659 "5" "5"
660 done
661 done
662
663######### ruby client - java server ##############
664for proto in $(intersection "${ruby_protocols}" "${java_protocols}"); do
665 for trans in $(intersection "${ruby_transports}" "${java_server_transports}"); do
666 for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
667 case "$sock" in
668 "ip" ) extraparam="";;
669 "ip-ssl" ) extraparam="--ssl";;
670 esac
671 do_test "ruby-java" "${proto}" "${trans}-${sock}" \
672 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \
673 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \
674 "15" "5"
675 done
676 done
677done
678
679for trans in $(intersection "${ruby_transports}" "${java_server_transports}"); do
680 for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
681 case "$sock" in
682 "ip" ) extraparam="";;
683 "ip-ssl" ) extraparam="--ssl";;
684 esac
685 do_test "ruby-java" "accel-binary" "${trans}-${sock}" \
686 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \
687 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} ${extraparam}\" run-testserver" \
688 "15" "5"
689 done
690 done
691
692######### java client - ruby server ##############
693for proto in $(intersection "${ruby_protocols}" "${java_protocols}"); do
694 for trans in $(intersection "${ruby_transports}" "${java_client_transports}"); do
695 for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
696 case "$sock" in
697 "ip" ) extraparam="";;
698 "ip-ssl" ) extraparam="--ssl";;
699 esac
700 do_test "java-ruby" "${proto}" "${trans}-${sock}" \
701 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \
702 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \
703 "10" "5"
704 done
705 done
706done
707
708for trans in $(intersection "${ruby_transports}" "${java_client_transports}"); do
709 for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
710 case "$sock" in
711 "ip" ) extraparam="";;
712 "ip-ssl" ) extraparam="--ssl";;
713 esac
714 do_test "java-ruby" "binary-accel" "${trans}-${sock}" \
715 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} ${extraparam}\" run-testclient" \
716 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \
717 "10" "5"
718 done
719 done
720
721######### ruby client - nodejs server ##############
722for proto in $(intersection "${ruby_protocols}" "${nodejs_protocols}"); do
723 for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
724 for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
725 case "$sock" in
726 "ip" ) extraparam="";;
727 "ip-ssl" ) extraparam="--ssl";;
728 esac
729 do_test "ruby-nodejs" "${proto}" "${trans}-${sock}" \
730 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \
731 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \
732 "5" "2"
733 done
734 done
735done
736
737for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
738 for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
739 case "$sock" in
740 "ip" ) extraparam="";;
741 "ip-ssl" ) extraparam="--ssl";;
742 esac
743 do_test "ruby-nodejs" "${proto}" "${trans}-${sock}" \
744 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \
745 "node ${NODE_TEST_DIR}/server.js -p binary -t ${trans} ${extraparam}" \
746 "5" "2"
747 done
748 done
749
750######### nodejs client - ruby server ##############
751for proto in $(intersection "${ruby_protocols}" "${nodejs_protocols}"); do
752 for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
753 for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
754 case "$sock" in
755 "ip" ) extraparam="";;
756 "ip-ssl" ) extraparam="--ssl";;
757 esac
758 do_test "nodejs-ruby" "${proto}" "${trans}-${sock}" \
759 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \
760 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \
761 "10" "5"
762 done
763 done
764done
765
766for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
767 for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
768 case "$sock" in
769 "ip" ) extraparam="";;
770 "ip-ssl" ) extraparam="--ssl";;
771 esac
772 do_test "nodejs-ruby" "binary-accel" "${trans}-${sock}" \
773 "node ${NODE_TEST_DIR}/client.js -p binary -t ${trans} ${extraparam}" \
774 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \
775 "10" "2"
776 done
777 done
778
cdwijayarathnad9217912014-08-15 22:18:30 +0530779######### py client - ruby server ##############
Roger Meiera3570ac2014-06-10 22:16:14 +0200780for proto in $(intersection "${py_protocols}" "${ruby_protocols}"); do
781 for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
782 for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
783 case "$sock" in
784 "ip" ) extraparam="";;
785 "ip-ssl" ) extraparam="--ssl";;
786 esac
787 do_test "py-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530788 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=9090 --host=localhost --genpydir=gen-py ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200789 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \
790 "15" "5"
791 done
792 done
793done
794
795for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
796 for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
797 case "$sock" in
798 "ip" ) extraparam="";;
799 "ip-ssl" ) extraparam="--ssl";;
800 esac
801 do_test "py-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530802 "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=gen-py ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200803 "ruby rb/integration/TestServer.rb --protocol=binary --transport=${trans}" \
804 "15" "5"
805 do_test "py-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530806 "py/TestClient.py --protocol=binary --transport=${trans} --port=9090 --host=localhost --genpydir=gen-py ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200807 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \
808 "15" "5"
809 done
810 done
811
812######### ruby client - py server ##############
813for proto in $(intersection "${py_protocols}" "${ruby_protocols}"); do
814 for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
815 for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
816 case "$sock" in
817 "ip" ) extraparam="";;
818 "ip-ssl" ) extraparam="--ssl";;
819 esac
820 do_test "ruby-py" "${proto}" "${trans}-${sock}" \
821 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530822 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=9090 --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200823 "5" "2"
824 done
825 done
826done
827
828for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
829 for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
830 case "$sock" in
831 "ip" ) extraparam="";;
832 "ip-ssl" ) extraparam="--ssl";;
833 esac
834 do_test "ruby-py" "binary-accel" "${trans}-${sock}" \
835 "ruby rb/integration/TestClient.rb --protocol=binary --transport=${trans}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530836 "py/TestServer.py --protocol=accel --transport=${trans} --port=9090 --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200837 "5" "2"
838 do_test "ruby-py" "accel-binary" "${trans}-${sock}" \
839 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \
cdwijayarathnad9217912014-08-15 22:18:30 +0530840 "py/TestServer.py --protocol=binary --transport=${trans} --port=9090 --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200841 "5" "2"
842 done
843 done
844
cdwijayarathnad9217912014-08-15 22:18:30 +0530845######### hs client - hs server ###############
846for proto in $hs_protocols; do
847 for trans in $hs_transports; do
848 for sock in $hs_sockets; do
849 case "$sock" in
850 "ip" ) extraparam="";;
851 "ip-ssl" ) extraparam="--ssl";;
852 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
853 esac
854 do_test "hs-hs" "${proto}" "${trans}-${sock}" \
855 "hs/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \
856 "hs/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \
857 "2" "0.1"
858 done
859 done
860done
861
862######### hs client - cpp server ###############
863for proto in $(intersection "${hs_protocols}" "${cpp_protocols}"); do
864 for trans in $(intersection "${hs_transports}" "${cpp_transports}"); do
865 for sock in $(intersection "${hs_sockets}" "${cpp_sockets}"); do
866 case "$sock" in
867 "ip" ) extraparam="";;
868 "ip-ssl" ) extraparam="--ssl";;
869 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
870 esac
871 do_test "hs-cpp" "${proto}" "${trans}-${sock}" \
872 "hs/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \
873 "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \
874 "2" "0.1"
875 done
876 done
877done
878
879######### cpp client - hs server ###############
880for proto in $(intersection "${hs_protocols}" "${cpp_protocols}"); do
881 for trans in $(intersection "${hs_transports}" "${cpp_transports}"); do
882 for sock in $(intersection "${hs_sockets}" "${cpp_sockets}"); do
883 case "$sock" in
884 "ip" ) extraparam="";;
885 "ip-ssl" ) extraparam="--ssl";;
886 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
887 esac
888 do_test "cpp-hs" "${proto}" "${trans}-${sock}" \
889 "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \
890 "hs/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \
891 "2" "0.1"
892 done
893 done
894done
895
896######### hs client - java server ###############
897for proto in $(intersection "${hs_protocols}" "${java_protocols}"); do
898 for trans in $(intersection "${hs_transports}" "${java_transports}"); do
899 for sock in $(intersection "${hs_sockets}" "${java_sockets}"); do
900 case "$sock" in
901 "ip" ) extraparam="";;
902 "ip-ssl" ) extraparam="--ssl";;
903 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
904 esac
905 do_test "hs-java" "${proto}" "${trans}-${sock}" \
906 "hs/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \
907 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \
908 "5" "1"
909 done
910 done
911done
912
913######### java client - hs server ###############
914for proto in $(intersection "${hs_protocols}" "${java_protocols}"); do
915 for trans in $(intersection "${hs_transports}" "${java_transports}"); do
916 for sock in $(intersection "${hs_sockets}" "${java_sockets}"); do
917 case "$sock" in
918 "ip" ) extraparam="";;
919 "ip-ssl" ) extraparam="--ssl";;
920 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
921 esac
922 do_test "java-hs" "${proto}" "${trans}-${sock}" \
923 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \
924 "hs/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \
925 "5" "1"
926 done
927 done
928done
929
930######### py client -hs server ##############
931for proto in $(intersection "${hs_protocols}" "${py_protocols}"); do
932 for trans in $(intersection "${hs_transports}" "${py_transports}"); do
933 for sock in $(intersection "${hs_sockets}" "${py_sockets}"); do
934 case "$sock" in
935 "ip" ) extraparam="";;
936 "ip-ssl" ) extraparam="--ssl";;
937 esac
938 do_test "py-hs" "${proto}" "${trans}-${sock}" \
939 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=9090 --host=localhost --genpydir=gen-py ${extraparam}" \
940 "hs/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \
941 "10" "2"
942 done
943 done
944done
945
946for trans in $(intersection "${hs_transports}" "${py_transports}"); do
947 for sock in $(intersection "${hs_sockets}" "${py_sockets}"); do
948 case "$sock" in
949 "ip" ) extraparam="";;
950 "ip-ssl" ) extraparam="--ssl";;
951 esac
952 do_test "py-hs" "accel-binary" "${trans}-${sock}" \
953 "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=gen-py ${extraparam}" \
954 "hs/TestServer --protocol=binary --transport=${trans} ${extraparam}" \
955 "10" "2"
956 done
957 done
958
959######### hs client - py server ##############
960for proto in $(intersection "${hs_protocols}" "${py_protocols}"); do
961 for trans in $(intersection "${hs_transports}" "${py_transports}"); do
962 for sock in $(intersection "${hs_sockets}" "${py_sockets}"); do
963 case "$sock" in
964 "ip" ) extraparam="";;
965 "ip-ssl" ) extraparam="--ssl";;
966 esac
967 do_test "hs-py" "${proto}" "${trans}-${sock}" \
968 "hs/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \
969 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=9090 --genpydir=gen-py TSimpleServer ${extraparam}" \
970 "10" "2"
971 done
972 done
973done
974
975for trans in $(intersection "${hs_transports}" "${py_transports}"); do
976 for sock in $(intersection "${hs_sockets}" "${py_sockets}"); do
977 case "$sock" in
978 "ip" ) extraparam="";;
979 "ip-ssl" ) extraparam="--ssl";;
980 esac
981 do_test "hs-py" "binary-accel" "${trans}-${sock}" \
982 "hs/TestClient --protocol=binary --transport=${trans} ${extraparam}" \
983 "py/TestServer.py --protocol=accel --transport=${trans} --port=9090 --genpydir=gen-py TSimpleServer ${extraparam}" \
984 "10" "2"
985 done
986 done
987
988######### nodejs client - hs server ##############
989for proto in $(intersection "${nodejs_protocols}" "${hs_protocols}"); do
990 for trans in $(intersection "${nodejs_transports}" "${hs_transports}"); do
991 for sock in $(intersection "${nodejs_sockets}" "${hs_sockets}"); do
992 case "$sock" in
993 "ip" ) extraparam="";;
994 "ip-ssl" ) extraparam="--ssl";;
995 esac
996 do_test "nodejs-hs" "${proto}" "${trans}-${sock}" \
997 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \
998 "hs/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \
999 "5" "0.2"
1000 done
1001 done
1002done
1003
1004######### hs client - nodejs server ##############
1005for proto in $(intersection "${nodejs_protocols}" "${hs_protocols}"); do
1006 for trans in $(intersection "${nodejs_transports}" "${hs_transports}"); do
1007 for sock in $(intersection "${nodejs_sockets}" "${hs_sockets}"); do
1008 case "$sock" in
1009 "ip" ) extraparam="";;
1010 "ip-ssl" ) extraparam="--ssl";;
1011 esac
1012 do_test "hs-nodejs" "${proto}" "${trans}-${sock}" \
1013 "hs/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \
1014 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \
1015 "5" "2"
1016 done
1017 done
1018done
1019
1020######### ruby client - hs server ##############
1021for proto in $(intersection "${hs_protocols}" "${ruby_protocols}"); do
1022 for trans in $(intersection "${hs_transports}" "${ruby_transports}"); do
1023 for sock in $(intersection "${hs_sockets}" "${ruby_sockets}"); do
1024 case "$sock" in
1025 "ip" ) extraparam="";;
1026 "ip-ssl" ) extraparam="--ssl";;
1027 esac
1028 do_test "ruby-hs" "${proto}" "${trans}-${sock}" \
1029 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \
1030 "hs/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \
1031 "5" "5"
1032 done
1033 done
1034done
1035
1036for trans in $(intersection "${hs_transports}" "${ruby_transports}"); do
1037 for sock in $(intersection "${hs_sockets}" "${ruby_sockets}"); do
1038 case "$sock" in
1039 "ip" ) extraparam="";;
1040 "ip-ssl" ) extraparam="--ssl";;
1041 esac
1042 do_test "ruby-cpp" "accel-binary" "${trans}-${sock}" \
1043 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \
1044 "hs/TestServer --protocol=binary --transport=${trans} ${extraparam}" \
1045 "5" "5"
1046 done
1047 done
1048
1049######### hs client - ruby server ##############
1050for proto in $(intersection "${hs_protocols}" "${ruby_protocols}"); do
1051 for trans in $(intersection "${hs_transports}" "${ruby_transports}"); do
1052 for sock in $(intersection "${hs_sockets}" "${ruby_sockets}"); do
1053 case "$sock" in
1054 "ip" ) extraparam="";;
1055 "ip-ssl" ) extraparam="--ssl";;
1056 esac
1057 do_test "hs-ruby" "${proto}" "${trans}-${sock}" \
1058 "hs/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \
1059 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \
1060 "5" "5"
1061 done
1062 done
1063done
1064
1065for trans in $(intersection "${hs_transports}" "${ruby_transports}"); do
1066 for sock in $(intersection "${hs_sockets}" "${ruby_sockets}"); do
1067 case "$sock" in
1068 "ip" ) extraparam="";;
1069 "ip-ssl" ) extraparam="--ssl";;
1070 esac
1071 do_test "hs-ruby" "binary-accel" "${trans}-${sock}" \
1072 "hs/TestClient --protocol=binary --transport=${trans} ${extraparam}" \
1073 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \
1074 "5" "5"
1075 done
1076 done
1077
Roger Meiera3570ac2014-06-10 22:16:14 +02001078
Roger Meier691ec002012-11-02 07:50:24 +00001079# delete Unix Domain Socket used by cpp tests
1080rm -f /tmp/ThriftTest.thrift
1081
Jens Geyerc1d79432014-04-22 22:52:43 +02001082######### csharp client - csharp server #############
1083export MONO_PATH=../lib/csharp
1084for proto in $csharp_protocols; do
1085 for trans in $csharp_transports; do
1086 for sock in $csharp_sockets; do
1087 case "$sock" in
1088 "ip" ) extraparam="";;
1089 "ip-ssl" ) extraparam="--ssl";;
1090 esac
1091 do_test "csharp-csharp" "${proto}" "${trans}-${sock}" \
1092 "../lib/csharp/test/ThriftTest/TestClientServer.exe client --protocol=${proto} --transport=${trans} ${extraparam}" \
1093 "../lib/csharp/test/ThriftTest/TestClientServer.exe server --protocol=${proto} --transport=${trans} ${extraparam}" \
henriqued5aba4c2014-04-30 18:11:11 +02001094 "5" "1"
Jens Geyerc1d79432014-04-22 22:52:43 +02001095 done
1096 done
1097done
1098
Roger Meier4edac7f2014-05-02 21:07:01 +02001099do_test "js-java" "json" "http-ip" \
Roger Meier4d5157d2012-01-09 21:23:19 +00001100 "" \
1101 "ant -f ../lib/js/test/build.xml unittest" \
henriqued17f1c92014-04-30 16:21:25 +02001102 "2" "2"
Roger Meier4d5157d2012-01-09 21:23:19 +00001103do_test "perl-cpp" "binary" "buffered-ip" \
Roger Meier01b568c2012-01-10 21:30:02 +00001104 "perl -I perl/gen-perl/ -I../lib/perl/lib/ perl/TestClient.pl" \
Roger Meier4d5157d2012-01-09 21:23:19 +00001105 "cpp/TestServer" \
henriqued5aba4c2014-04-30 18:11:11 +02001106 "10" "2"
Roger Meierb33967b2012-01-21 09:18:05 +00001107do_test "php-cpp" "binary" "buffered-ip" \
1108 "make -C php/ client" \
1109 "cpp/TestServer" \
henriqued5aba4c2014-04-30 18:11:11 +02001110 "10" "2"
Roger Meier4edac7f2014-05-02 21:07:01 +02001111
1112echo " failed tests are logged to test/log/error.log"
Roger Meiercc0fe272014-05-16 23:18:25 +02001113echo " full log is here test/log/client_server_protocol_transport_client.log"
1114echo " full log is here test/log/client_server_protocol_transport_server.log"
1115echo " or look at file://$BASEDIR/$STATUS_HTML"
1116
henriquead4df162014-05-20 13:18:45 +02001117ELAPSED_TIME=$(echo "(${SECONDS} - ${START_TIME})" | bc)
1118DURATION="${ELAPSED_TIME} seconds"
Roger Meierbea27342014-08-08 00:30:50 +02001119
1120echo $FAILED failed of $TESTCOUNT tests in total
Roger Meiercc0fe272014-05-16 23:18:25 +02001121echo "test an took" $DURATION
1122print_html_footer "$DURATION"
1123
Roger Meier4edac7f2014-05-02 21:07:01 +02001124date
Roger Meier82525772012-11-16 00:38:27 +00001125cd -