Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 1 | #!/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 Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 29 | START_TIME=$SECONDS |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 30 | cd "$( dirname "$0" )" |
| 31 | BASEDIR=$(pwd) |
| 32 | |
Roger Meier | bea2734 | 2014-08-08 00:30:50 +0200 | [diff] [blame] | 33 | TESTCOUNT=0 |
| 34 | FAILED=0 |
| 35 | |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 36 | print_header() { |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 37 | printf "%-16s %-13s %-17s %-s\n" "client-server:" "protocol:" "transport:" "result:" |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 38 | } |
| 39 | |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 40 | STATUS_HTML="status.html" |
| 41 | |
| 42 | print_html_header() { |
| 43 | cat << 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> |
| 78 | test_data = [ |
| 79 | EOF |
| 80 | } |
| 81 | |
| 82 | print_html_footer() { |
| 83 | duration=$1 |
| 84 | cat << EOF >> $STATUS_HTML |
| 85 | ] |
| 86 | </script> |
| 87 | <h2>Test Information</h2> |
| 88 | <pre> |
| 89 | Test Date: `date --iso-8601=seconds` |
| 90 | Revision: `git rev-parse --short HEAD` |
| 91 | OS: `uname -a` |
| 92 | Test duration: $duration |
| 93 | </pre> |
| 94 | </body> |
| 95 | </html> |
| 96 | EOF |
| 97 | } |
| 98 | |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 99 | intersection() { |
| 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 Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 111 | do_test () { |
| 112 | client_server=$1 |
| 113 | protocol=$2 |
| 114 | transport=$3 |
| 115 | client_exec=$4 |
| 116 | server_exec=$5 |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 117 | client_timeout=$6 |
| 118 | server_startup_time=$7 |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 119 | |
| 120 | testname=${client_server}_${protocol}_${transport} |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 121 | server_timeout=$(echo "(${server_startup_time}+${client_timeout})" | bc) |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 122 | printf "%-16s %-13s %-17s" ${client_server} ${protocol} ${transport} |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 123 | |
Roger Meier | 284101c | 2014-03-11 21:20:35 +0100 | [diff] [blame] | 124 | timeout $server_timeout $server_exec > log/${testname}_server.log 2>&1 & |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 125 | server_pid=$! |
| 126 | |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 127 | sleep $server_startup_time |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 128 | timeout $client_timeout $client_exec > log/${testname}_client.log 2>&1 |
Ben Craig | f41d79d | 2014-01-08 15:15:48 -0600 | [diff] [blame] | 129 | |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 130 | if [ "$?" -eq "0" ]; then |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 131 | result="success($?)" |
| 132 | echo " $result" |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 133 | else |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 134 | result="failure($?)" |
| 135 | echo " $result" |
Roger Meier | 4edac7f | 2014-05-02 21:07:01 +0200 | [diff] [blame] | 136 | # 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 Meier | bea2734 | 2014-08-08 00:30:50 +0200 | [diff] [blame] | 145 | FAILED=$(($FAILED + 1)) |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 146 | fi |
Roger Meier | bea2734 | 2014-08-08 00:30:50 +0200 | [diff] [blame] | 147 | TESTCOUNT=$(($TESTCOUNT + 1)) |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 148 | |
henrique | ad4df16 | 2014-05-20 13:18:45 +0200 | [diff] [blame] | 149 | # split client-server string |
| 150 | client=${client_server%-*} |
| 151 | server=${client_server#*-} |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 152 | |
| 153 | cat << EOF >> $STATUS_HTML |
| 154 | [ |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 155 | "${server}", |
Roger Meier | c62798b | 2014-05-23 12:54:08 +0200 | [diff] [blame] | 156 | "${client}", |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 157 | "${protocol}", |
| 158 | "${transport}", |
| 159 | "${result} (<a href=\"log/${testname}_client.log\">client</a>, <a href=\"log/${testname}_server.log\">server</a>)" |
| 160 | ], |
| 161 | EOF |
| 162 | |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 163 | # silently kill server |
| 164 | kill ${server_pid} 2>/dev/null && wait ${server_pid} 2>/dev/null |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 165 | } |
| 166 | |
| 167 | echo "Apache Thrift - integration test suite" |
| 168 | date |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 169 | |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 170 | |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 171 | echo "======================================================" |
| 172 | |
| 173 | rm -rf log |
| 174 | mkdir -p log |
| 175 | |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 176 | |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 177 | print_header |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 178 | print_html_header |
| 179 | |
| 180 | ant -f ../lib/java/build.xml compile-test 1>/dev/null |
| 181 | |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 182 | |
Roger Meier | 8252577 | 2012-11-16 00:38:27 +0000 | [diff] [blame] | 183 | #TODO add enum for parameters |
| 184 | #TODO align program arguments across languages |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 185 | |
Roger Meier | 023192f | 2014-02-12 09:35:12 +0100 | [diff] [blame] | 186 | cpp_protocols="binary compact json" |
| 187 | java_protocols="binary compact json" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 188 | cpp_transports="buffered framed http" |
| 189 | java_server_transports="buffered framed fastframed" |
| 190 | java_client_transports=${java_server_transports}" http" |
Roger Meier | 5829a2c | 2014-04-08 00:28:17 +0200 | [diff] [blame] | 191 | cpp_sockets="ip domain ip-ssl" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 192 | java_sockets="ip ip-ssl" |
| 193 | # TODO fastframed java transport is another implementation of framed transport |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 194 | |
Roger Meier | d9b331d | 2014-05-25 22:59:17 +0200 | [diff] [blame] | 195 | nodejs_protocols="binary compact json" |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 196 | nodejs_transports="buffered framed" |
Roger Meier | 57b354b | 2014-02-22 01:01:58 +0100 | [diff] [blame] | 197 | nodejs_sockets="ip ip-ssl" |
Roger Meier | eaa61d8 | 2012-01-12 21:38:29 +0000 | [diff] [blame] | 198 | |
Jens Geyer | c1d7943 | 2014-04-22 22:52:43 +0200 | [diff] [blame] | 199 | csharp_protocols="binary compact json" |
| 200 | csharp_transports="buffered framed" |
| 201 | csharp_sockets="ip ip-ssl" |
| 202 | |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 203 | py_protocols="binary compact json accel" |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 204 | py_transports="buffered framed" |
| 205 | py_sockets="ip ip-ssl" |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 206 | |
Roger Meier | a3570ac | 2014-06-10 22:16:14 +0200 | [diff] [blame] | 207 | ruby_protocols="binary compact json accel" |
| 208 | ruby_transports="buffered framed" |
| 209 | ruby_sockets="ip" |
| 210 | |
Noam Zilberstein | af5d64a | 2014-07-31 15:44:13 -0700 | [diff] [blame^] | 211 | hs_protocols="binary compact json" |
| 212 | hs_transports="buffered" |
| 213 | hs_sockets="ip" |
| 214 | |
| 215 | ######### hs client - hs server ############### |
| 216 | for proto in $hs_protocols; do |
| 217 | for trans in $hs_transports; do |
| 218 | for sock in $hs_sockets; do |
| 219 | case "$sock" in |
| 220 | "ip" ) extraparam="";; |
| 221 | "ip-ssl" ) extraparam="--ssl";; |
| 222 | "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";; |
| 223 | esac |
| 224 | do_test "hs-hs" "${proto}" "${trans}-${sock}" \ |
| 225 | "hs/TestClient --protocol ${proto} --transport ${trans} ${extraparam}" \ |
| 226 | "hs/TestServer --protocol ${proto} --transport ${trans} ${extraparam}" \ |
| 227 | "2" "0.1" |
| 228 | done |
| 229 | done |
| 230 | done |
| 231 | |
| 232 | ######### hs client - cpp server ############### |
| 233 | for proto in $(intersection "${hs_protocols}" "${cpp_protocols}"); do |
| 234 | for trans in $(intersection "${hs_transports}" "${cpp_transports}"); do |
| 235 | for sock in $(intersection "${hs_sockets}" "${cpp_sockets}"); do |
| 236 | case "$sock" in |
| 237 | "ip" ) extraparam="";; |
| 238 | "ip-ssl" ) extraparam="--ssl";; |
| 239 | "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";; |
| 240 | esac |
| 241 | do_test "hs-cpp" "${proto}" "${trans}-${sock}" \ |
| 242 | "hs/TestClient --protocol ${proto} --transport ${trans} ${extraparam}" \ |
| 243 | "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \ |
| 244 | "2" "0.1" |
| 245 | done |
| 246 | done |
| 247 | done |
| 248 | |
| 249 | ######### cpp client - hs server ############### |
| 250 | for proto in $(intersection "${hs_protocols}" "${cpp_protocols}"); do |
| 251 | for trans in $(intersection "${hs_transports}" "${cpp_transports}"); do |
| 252 | for sock in $(intersection "${hs_sockets}" "${cpp_sockets}"); do |
| 253 | case "$sock" in |
| 254 | "ip" ) extraparam="";; |
| 255 | "ip-ssl" ) extraparam="--ssl";; |
| 256 | "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";; |
| 257 | esac |
| 258 | do_test "cpp-hs" "${proto}" "${trans}-${sock}" \ |
| 259 | "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \ |
| 260 | "hs/TestServer --protocol ${proto} --transport ${trans} ${extraparam}" \ |
| 261 | "2" "0.1" |
| 262 | done |
| 263 | done |
| 264 | done |
| 265 | |
| 266 | ######### hs client - java server ############### |
| 267 | for proto in $(intersection "${hs_protocols}" "${java_protocols}"); do |
| 268 | for trans in $(intersection "${hs_transports}" "${java_transports}"); do |
| 269 | for sock in $(intersection "${hs_sockets}" "${java_sockets}"); do |
| 270 | case "$sock" in |
| 271 | "ip" ) extraparam="";; |
| 272 | "ip-ssl" ) extraparam="--ssl";; |
| 273 | "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";; |
| 274 | esac |
| 275 | do_test "hs-java" "${proto}" "${trans}-${sock}" \ |
| 276 | "hs/TestClient --protocol ${proto} --transport ${trans} ${extraparam}" \ |
| 277 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \ |
| 278 | "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \ |
| 279 | "5" "1" |
| 280 | done |
| 281 | done |
| 282 | done |
| 283 | |
| 284 | ######### java client - hs server ############### |
| 285 | for proto in $(intersection "${hs_protocols}" "${java_protocols}"); do |
| 286 | for trans in $(intersection "${hs_transports}" "${java_transports}"); do |
| 287 | for sock in $(intersection "${hs_sockets}" "${java_sockets}"); do |
| 288 | case "$sock" in |
| 289 | "ip" ) extraparam="";; |
| 290 | "ip-ssl" ) extraparam="--ssl";; |
| 291 | "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";; |
| 292 | esac |
| 293 | do_test "java-hs" "${proto}" "${trans}-${sock}" \ |
| 294 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \ |
| 295 | "hs/TestServer --protocol ${proto} --transport ${trans} ${extraparam}" \ |
| 296 | "5" "1" |
| 297 | done |
| 298 | done |
| 299 | done |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 300 | |
| 301 | ######### java client - java server ############# |
| 302 | for proto in $java_protocols; do |
| 303 | for trans in $java_server_transports; do |
| 304 | for sock in $java_sockets; do |
| 305 | case "$sock" in |
| 306 | "ip" ) extraparam="";; |
| 307 | "ip-ssl" ) extraparam="--ssl";; |
| 308 | esac |
| 309 | do_test "java-java" "${proto}" "${trans}-${sock}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 310 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \ |
| 311 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \ |
| 312 | "5" "1" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 313 | done |
| 314 | done |
| 315 | done |
| 316 | |
| 317 | ######### cpp client - cpp server ############### |
| 318 | for proto in $cpp_protocols; do |
| 319 | for trans in $cpp_transports; do |
| 320 | for sock in $cpp_sockets; do |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 321 | case "$sock" in |
| 322 | "ip" ) extraparam="";; |
| 323 | "ip-ssl" ) extraparam="--ssl";; |
| 324 | "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";; |
| 325 | esac |
| 326 | do_test "cpp-cpp" "${proto}" "${trans}-${sock}" \ |
| 327 | "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \ |
| 328 | "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 329 | "2" "0.1" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 330 | done |
| 331 | done |
| 332 | done |
| 333 | |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 334 | |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 335 | ######### java client - cpp server ############## |
| 336 | # warning: ssl over http is not supported in java client! |
| 337 | for proto in $(intersection "${java_protocols}" "${cpp_protocols}"); do |
| 338 | for trans in $(intersection "${java_client_transports}" "${cpp_transports}"); do |
| 339 | for sock in $(intersection "${java_sockets}" "${cpp_sockets}"); do |
| 340 | case "$sock" in |
| 341 | "ip" ) extraparam="";; |
| 342 | "ip-ssl" ) extraparam="--ssl";; |
| 343 | esac |
Roger Meier | 188024e | 2014-04-17 21:53:45 +0200 | [diff] [blame] | 344 | do_test "java-cpp" "${proto}" "${trans}-${sock}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 345 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \ |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 346 | "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}"\ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 347 | "5" "0.1" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 348 | done |
| 349 | done |
| 350 | done |
| 351 | |
| 352 | ######### cpp client - java server ############## |
| 353 | for proto in $(intersection "${cpp_protocols}" "${java_protocols}"); do |
| 354 | for trans in $(intersection "${cpp_transports}" "${java_server_transports}"); do |
| 355 | for sock in $(intersection "${java_sockets}" "${cpp_sockets}"); do |
| 356 | case "$sock" in |
| 357 | "ip" ) extraparam="";; |
| 358 | "ip-ssl" ) extraparam="--ssl";; |
| 359 | esac |
Roger Meier | 188024e | 2014-04-17 21:53:45 +0200 | [diff] [blame] | 360 | do_test "cpp-java" "${proto}" "${trans}-${sock}" \ |
| 361 | "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 362 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \ |
| 363 | "5" "1" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 364 | done |
| 365 | done |
| 366 | done |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 367 | |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 368 | |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 369 | NODE_TEST_DIR=${BASEDIR}/../lib/nodejs/test |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 370 | export NODE_PATH=${NODE_TEST_DIR}:${NODE_TEST_DIR}/../lib:${NODE_PATH} |
Roger Meier | d9b331d | 2014-05-25 22:59:17 +0200 | [diff] [blame] | 371 | ######### nodejs client - nodejs server ############## |
Roger Meier | d9b331d | 2014-05-25 22:59:17 +0200 | [diff] [blame] | 372 | for proto in ${nodejs_protocols}; do |
| 373 | for trans in ${nodejs_transports}; do |
| 374 | for sock in ${nodejs_sockets}; do |
| 375 | case "$sock" in |
| 376 | "ip" ) extraparam="";; |
| 377 | "ip-ssl" ) extraparam="--ssl";; |
| 378 | esac |
| 379 | do_test "nodejs-nodejs" "${proto}" "${trans}-${sock}" \ |
| 380 | "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 381 | "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 382 | "5" "0.2" |
| 383 | done |
| 384 | done |
| 385 | done |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 386 | |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 387 | ######### nodejs client - cpp server ############## |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 388 | for proto in $(intersection "${nodejs_protocols}" "${cpp_protocols}"); do |
| 389 | for trans in $(intersection "${nodejs_transports}" "${cpp_transports}"); do |
| 390 | for sock in $(intersection "${nodejs_sockets}" "${cpp_sockets}"); do |
Roger Meier | 57b354b | 2014-02-22 01:01:58 +0100 | [diff] [blame] | 391 | case "$sock" in |
| 392 | "ip" ) extraparam="";; |
| 393 | "ip-ssl" ) extraparam="--ssl";; |
| 394 | esac |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 395 | do_test "nodejs-cpp" "${proto}" "${trans}-${sock}" \ |
| 396 | "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \ |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 397 | "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 398 | "5" "0.2" |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 399 | done |
| 400 | done |
| 401 | done |
| 402 | |
| 403 | ######### cpp client - nodejs server ############## |
| 404 | for proto in $(intersection "${nodejs_protocols}" "${cpp_protocols}"); do |
| 405 | for trans in $(intersection "${nodejs_transports}" "${cpp_transports}"); do |
| 406 | for sock in $(intersection "${nodejs_sockets}" "${cpp_sockets}"); do |
Roger Meier | 57b354b | 2014-02-22 01:01:58 +0100 | [diff] [blame] | 407 | case "$sock" in |
| 408 | "ip" ) extraparam="";; |
| 409 | "ip-ssl" ) extraparam="--ssl";; |
| 410 | esac |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 411 | do_test "cpp-nodejs" "${proto}" "${trans}-${sock}" \ |
Roger Meier | 57b354b | 2014-02-22 01:01:58 +0100 | [diff] [blame] | 412 | "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \ |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 413 | "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 414 | "5" "2" |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 415 | done |
| 416 | done |
| 417 | done |
| 418 | |
Roger Meier | 5c6ad24 | 2014-05-27 21:18:00 +0200 | [diff] [blame] | 419 | ######### nodejs client - java server ############## |
Roger Meier | 5c6ad24 | 2014-05-27 21:18:00 +0200 | [diff] [blame] | 420 | for proto in $(intersection "${nodejs_protocols}" "${java_protocols}"); do |
| 421 | for trans in $(intersection "${nodejs_transports}" "${java_server_transports}"); do |
| 422 | for sock in $(intersection "${nodejs_sockets}" "${java_sockets}"); do |
| 423 | case "$sock" in |
| 424 | "ip" ) extraparam="";; |
| 425 | "ip-ssl" ) extraparam="--ssl";; |
| 426 | esac |
| 427 | do_test "nodejs-java" "${proto}" "${trans}-${sock}" \ |
| 428 | "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 429 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \ |
| 430 | "5" "1" |
| 431 | done |
| 432 | done |
| 433 | done |
| 434 | |
| 435 | ######### java client - nodejs server ############## |
| 436 | for proto in $(intersection "${nodejs_protocols}" "${java_protocols}"); do |
| 437 | for trans in $(intersection "${nodejs_transports}" "${java_client_transports}"); do |
| 438 | for sock in $(intersection "${nodejs_sockets}" "${java_sockets}"); do |
| 439 | case "$sock" in |
| 440 | "ip" ) extraparam="";; |
| 441 | "ip-ssl" ) extraparam="--ssl";; |
| 442 | esac |
| 443 | do_test "java-nodejs" "${proto}" "${trans}-${sock}" \ |
| 444 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \ |
| 445 | "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 446 | "5" "2" |
| 447 | done |
| 448 | done |
| 449 | done |
| 450 | |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 451 | ######### py client - py server ############## |
| 452 | for proto in ${py_protocols}; do |
| 453 | for trans in ${py_transports}; do |
| 454 | for sock in ${py_sockets}; do |
| 455 | case "$sock" in |
| 456 | "ip" ) extraparam="";; |
| 457 | "ip-ssl" ) extraparam="--ssl";; |
| 458 | esac |
| 459 | do_test "py-py" "${proto}" "${trans}-${sock}" \ |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 460 | "py/TestClient.py --protocol=${proto} --transport={trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 461 | "py/TestServer.py --protocol=${proto} --transport={trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 462 | "10" "2" |
| 463 | done |
| 464 | done |
| 465 | done |
| 466 | |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 467 | for trans in ${py_transports}; do |
| 468 | for sock in ${py_sockets}; do |
| 469 | case "$sock" in |
| 470 | "ip" ) extraparam="";; |
| 471 | "ip-ssl" ) extraparam="--ssl";; |
| 472 | esac |
| 473 | do_test "py-py" "accel-binary" "${trans}-${sock}" \ |
| 474 | "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 475 | "py/TestServer.py --protocol=binary --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 476 | "10" "2" |
| 477 | do_test "py-py" "binary-accel" "${trans}-${sock}" \ |
| 478 | "py/TestClient.py --protocol=binary --transport={trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 479 | "py/TestServer.py --protocol=accel --transport={trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 480 | "10" "2" |
| 481 | done |
| 482 | done |
| 483 | |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 484 | ######### py client - cpp server ############## |
| 485 | for proto in $(intersection "${cpp_protocols}" "${py_protocols}"); do |
| 486 | for trans in $(intersection "${cpp_transports}" "${py_transports}"); do |
| 487 | for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do |
| 488 | case "$sock" in |
| 489 | "ip" ) extraparam="";; |
| 490 | "ip-ssl" ) extraparam="--ssl";; |
| 491 | esac |
| 492 | do_test "py-cpp" "${proto}" "${trans}-${sock}" \ |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 493 | "py/TestClient.py --protocol=${proto} --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 494 | "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \ |
| 495 | "10" "2" |
| 496 | done |
| 497 | done |
| 498 | done |
| 499 | |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 500 | for trans in $(intersection "${cpp_transports}" "${py_transports}"); do |
| 501 | for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do |
| 502 | case "$sock" in |
| 503 | "ip" ) extraparam="";; |
| 504 | "ip-ssl" ) extraparam="--ssl";; |
| 505 | esac |
| 506 | do_test "py-cpp" "accel-binary" "${trans}-${sock}" \ |
| 507 | "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 508 | "cpp/TestServer --protocol=binary --transport=${trans} ${extraparam}" \ |
| 509 | "10" "2" |
| 510 | done |
| 511 | done |
| 512 | |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 513 | ######### cpp client - py server ############## |
| 514 | for proto in $(intersection "${cpp_protocols}" "${py_protocols}"); do |
| 515 | for trans in $(intersection "${cpp_transports}" "${py_transports}"); do |
| 516 | for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do |
| 517 | case "$sock" in |
| 518 | "ip" ) extraparam="";; |
| 519 | "ip-ssl" ) extraparam="--ssl";; |
| 520 | esac |
| 521 | do_test "cpp-py" "${proto}" "${trans}-${sock}" \ |
| 522 | "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \ |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 523 | "py/TestServer.py --protocol=${proto} --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 524 | "10" "2" |
| 525 | done |
| 526 | done |
| 527 | done |
| 528 | |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 529 | for trans in $(intersection "${cpp_transports}" "${py_transports}"); do |
| 530 | for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do |
| 531 | case "$sock" in |
| 532 | "ip" ) extraparam="";; |
| 533 | "ip-ssl" ) extraparam="--ssl";; |
| 534 | esac |
| 535 | do_test "cpp-py" "binary-accel" "${trans}-${sock}" \ |
| 536 | "cpp/TestClient --protocol=binary --transport=${trans} ${extraparam}" \ |
| 537 | "py/TestServer.py --protocol=accel --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 538 | "10" "2" |
| 539 | done |
| 540 | done |
| 541 | |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 542 | ######### py client - java server ############## |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 543 | for proto in $(intersection "${py_protocols}" "${java_protocols}"); do |
| 544 | for trans in $(intersection "${py_transports}" "${java_server_transports}"); do |
| 545 | for sock in $(intersection "${py_sockets}" "${java_sockets}"); do |
| 546 | case "$sock" in |
| 547 | "ip" ) extraparam="";; |
| 548 | "ip-ssl" ) extraparam="--ssl";; |
| 549 | esac |
| 550 | do_test "py-java" "${proto}" "${trans}-${sock}" \ |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 551 | "py/TestClient.py --protocol=${proto} --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 552 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \ |
| 553 | "15" "2" |
| 554 | done |
| 555 | done |
| 556 | done |
| 557 | |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 558 | for trans in $(intersection "${py_transports}" "${java_server_transports}"); do |
| 559 | for sock in $(intersection "${py_sockets}" "${java_sockets}"); do |
| 560 | case "$sock" in |
| 561 | "ip" ) extraparam="";; |
| 562 | "ip-ssl" ) extraparam="--ssl";; |
| 563 | esac |
| 564 | do_test "py-java" "accel-binary" "${trans}-${sock}" \ |
| 565 | "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 566 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} ${extraparam}\" run-testserver" \ |
| 567 | "15" "2" |
| 568 | done |
| 569 | done |
| 570 | |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 571 | ######### java client - py server ############## |
| 572 | for proto in $(intersection "${py_protocols}" "${java_protocols}"); do |
| 573 | for trans in $(intersection "${py_transports}" "${java_client_transports}"); do |
| 574 | for sock in $(intersection "${py_sockets}" "${java_sockets}"); do |
| 575 | case "$sock" in |
| 576 | "ip" ) extraparam="";; |
| 577 | "ip-ssl" ) extraparam="--ssl";; |
| 578 | esac |
| 579 | do_test "java-py" "${proto}" "${trans}-${sock}" \ |
| 580 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \ |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 581 | "py/TestServer.py --protocol=${proto} --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 582 | "10" "5" |
| 583 | done |
| 584 | done |
| 585 | done |
| 586 | |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 587 | for trans in $(intersection "${py_transports}" "${java_client_transports}"); do |
| 588 | for sock in $(intersection "${py_sockets}" "${java_sockets}"); do |
| 589 | case "$sock" in |
| 590 | "ip" ) extraparam="";; |
| 591 | "ip-ssl" ) extraparam="--ssl";; |
| 592 | esac |
| 593 | do_test "java-py" "binary-accel" "${trans}-${sock}" \ |
| 594 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} ${extraparam}\" run-testclient" \ |
| 595 | "py/TestServer.py --protocol=accel --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 596 | "10" "5" |
| 597 | done |
| 598 | done |
| 599 | |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 600 | ######### py client - nodejs server ############## |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 601 | for proto in $(intersection "${py_protocols}" "${nodejs_protocols}"); do |
| 602 | for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do |
| 603 | for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do |
| 604 | case "$sock" in |
| 605 | "ip" ) extraparam="";; |
| 606 | "ip-ssl" ) extraparam="--ssl";; |
| 607 | esac |
| 608 | do_test "py-nodejs" "${proto}" "${trans}-${sock}" \ |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 609 | "py/TestClient.py --protocol=${proto} --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 610 | "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 611 | "15" "2" |
| 612 | done |
| 613 | done |
| 614 | done |
| 615 | |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 616 | for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do |
| 617 | for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do |
| 618 | case "$sock" in |
| 619 | "ip" ) extraparam="";; |
| 620 | "ip-ssl" ) extraparam="--ssl";; |
| 621 | esac |
| 622 | do_test "py-nodejs" "${proto}" "${trans}-${sock}" \ |
| 623 | "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 624 | "node ${NODE_TEST_DIR}/server.js -p binary -t ${trans} ${extraparam}" \ |
| 625 | "15" "2" |
| 626 | done |
| 627 | done |
| 628 | |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 629 | ######### nodejs client - py server ############## |
| 630 | for proto in $(intersection "${py_protocols}" "${nodejs_protocols}"); do |
| 631 | for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do |
| 632 | for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do |
| 633 | case "$sock" in |
| 634 | "ip" ) extraparam="";; |
| 635 | "ip-ssl" ) extraparam="--ssl";; |
| 636 | esac |
| 637 | do_test "nodejs-py" "${proto}" "${trans}-${sock}" \ |
| 638 | "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \ |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 639 | "py/TestServer.py --protocol=${proto} --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 640 | "10" "2" |
| 641 | done |
| 642 | done |
| 643 | done |
| 644 | |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 645 | for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do |
| 646 | for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do |
| 647 | case "$sock" in |
| 648 | "ip" ) extraparam="";; |
| 649 | "ip-ssl" ) extraparam="--ssl";; |
| 650 | esac |
| 651 | do_test "nodejs-py" "binary-accel" "${trans}-${sock}" \ |
| 652 | "node ${NODE_TEST_DIR}/client.js -p binary -t ${trans} ${extraparam}" \ |
| 653 | "py/TestServer.py --protocol=accel --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 654 | "10" "2" |
| 655 | done |
| 656 | done |
| 657 | |
Roger Meier | a3570ac | 2014-06-10 22:16:14 +0200 | [diff] [blame] | 658 | ######### ruby client - ruby server ############## |
| 659 | for proto in ${ruby_protocols}; do |
| 660 | for trans in ${ruby_transports}; do |
| 661 | for sock in ${ruby_sockets}; do |
| 662 | case "$sock" in |
| 663 | "ip" ) extraparam="";; |
| 664 | "ip-ssl" ) extraparam="--ssl";; |
| 665 | esac |
| 666 | do_test "ruby-ruby" "${proto}" "${trans}-${sock}" \ |
| 667 | "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=9091" \ |
| 668 | "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=9091" \ |
| 669 | "5" "5" |
| 670 | done |
| 671 | done |
| 672 | done |
| 673 | |
| 674 | for trans in ${ruby_transports}; do |
| 675 | for sock in ${ruby_sockets}; do |
| 676 | case "$sock" in |
| 677 | "ip" ) extraparam="";; |
| 678 | "ip-ssl" ) extraparam="--ssl";; |
| 679 | esac |
| 680 | do_test "ruby-ruby" "accel-binary" "${trans}-${sock}" \ |
| 681 | "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=9091" \ |
| 682 | "ruby rb/integration/TestServer.rb --protocol=binary --transport=${trans} --port=9091" \ |
| 683 | "5" "5" |
| 684 | do_test "ruby-ruby" "binary-accel" "${trans}-${sock}" \ |
| 685 | "ruby rb/integration/TestClient.rb --protocol=binary --transport=${trans} --port=9091" \ |
| 686 | "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=9091" \ |
| 687 | "5" "5" |
| 688 | done |
| 689 | done |
| 690 | |
| 691 | ######### ruby client - cpp server ############## |
| 692 | for proto in $(intersection "${cpp_protocols}" "${ruby_protocols}"); do |
| 693 | for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do |
| 694 | for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do |
| 695 | case "$sock" in |
| 696 | "ip" ) extraparam="";; |
| 697 | "ip-ssl" ) extraparam="--ssl";; |
| 698 | esac |
| 699 | do_test "ruby-cpp" "${proto}" "${trans}-${sock}" \ |
| 700 | "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \ |
| 701 | "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \ |
| 702 | "5" "5" |
| 703 | done |
| 704 | done |
| 705 | done |
| 706 | |
| 707 | for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do |
| 708 | for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do |
| 709 | case "$sock" in |
| 710 | "ip" ) extraparam="";; |
| 711 | "ip-ssl" ) extraparam="--ssl";; |
| 712 | esac |
| 713 | do_test "ruby-cpp" "accel-binary" "${trans}-${sock}" \ |
| 714 | "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \ |
| 715 | "cpp/TestServer --protocol=binary --transport=${trans} ${extraparam}" \ |
| 716 | "5" "5" |
| 717 | done |
| 718 | done |
| 719 | |
| 720 | ######### cpp client - ruby server ############## |
| 721 | for proto in $(intersection "${cpp_protocols}" "${ruby_protocols}"); do |
| 722 | for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do |
| 723 | for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do |
| 724 | case "$sock" in |
| 725 | "ip" ) extraparam="";; |
| 726 | "ip-ssl" ) extraparam="--ssl";; |
| 727 | esac |
| 728 | do_test "cpp-ruby" "${proto}" "${trans}-${sock}" \ |
| 729 | "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \ |
| 730 | "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \ |
| 731 | "5" "5" |
| 732 | done |
| 733 | done |
| 734 | done |
| 735 | |
| 736 | for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do |
| 737 | for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do |
| 738 | case "$sock" in |
| 739 | "ip" ) extraparam="";; |
| 740 | "ip-ssl" ) extraparam="--ssl";; |
| 741 | esac |
| 742 | do_test "cpp-ruby" "binary-accel" "${trans}-${sock}" \ |
| 743 | "cpp/TestClient --protocol=binary --transport=${trans} ${extraparam}" \ |
| 744 | "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \ |
| 745 | "5" "5" |
| 746 | done |
| 747 | done |
| 748 | |
| 749 | ######### ruby client - java server ############## |
| 750 | for proto in $(intersection "${ruby_protocols}" "${java_protocols}"); do |
| 751 | for trans in $(intersection "${ruby_transports}" "${java_server_transports}"); do |
| 752 | for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do |
| 753 | case "$sock" in |
| 754 | "ip" ) extraparam="";; |
| 755 | "ip-ssl" ) extraparam="--ssl";; |
| 756 | esac |
| 757 | do_test "ruby-java" "${proto}" "${trans}-${sock}" \ |
| 758 | "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \ |
| 759 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \ |
| 760 | "15" "5" |
| 761 | done |
| 762 | done |
| 763 | done |
| 764 | |
| 765 | for trans in $(intersection "${ruby_transports}" "${java_server_transports}"); do |
| 766 | for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do |
| 767 | case "$sock" in |
| 768 | "ip" ) extraparam="";; |
| 769 | "ip-ssl" ) extraparam="--ssl";; |
| 770 | esac |
| 771 | do_test "ruby-java" "accel-binary" "${trans}-${sock}" \ |
| 772 | "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \ |
| 773 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} ${extraparam}\" run-testserver" \ |
| 774 | "15" "5" |
| 775 | done |
| 776 | done |
| 777 | |
| 778 | ######### java client - ruby server ############## |
| 779 | for proto in $(intersection "${ruby_protocols}" "${java_protocols}"); do |
| 780 | for trans in $(intersection "${ruby_transports}" "${java_client_transports}"); do |
| 781 | for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do |
| 782 | case "$sock" in |
| 783 | "ip" ) extraparam="";; |
| 784 | "ip-ssl" ) extraparam="--ssl";; |
| 785 | esac |
| 786 | do_test "java-ruby" "${proto}" "${trans}-${sock}" \ |
| 787 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \ |
| 788 | "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \ |
| 789 | "10" "5" |
| 790 | done |
| 791 | done |
| 792 | done |
| 793 | |
| 794 | for trans in $(intersection "${ruby_transports}" "${java_client_transports}"); do |
| 795 | for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do |
| 796 | case "$sock" in |
| 797 | "ip" ) extraparam="";; |
| 798 | "ip-ssl" ) extraparam="--ssl";; |
| 799 | esac |
| 800 | do_test "java-ruby" "binary-accel" "${trans}-${sock}" \ |
| 801 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} ${extraparam}\" run-testclient" \ |
| 802 | "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \ |
| 803 | "10" "5" |
| 804 | done |
| 805 | done |
| 806 | |
| 807 | ######### ruby client - nodejs server ############## |
| 808 | for proto in $(intersection "${ruby_protocols}" "${nodejs_protocols}"); do |
| 809 | for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do |
| 810 | for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do |
| 811 | case "$sock" in |
| 812 | "ip" ) extraparam="";; |
| 813 | "ip-ssl" ) extraparam="--ssl";; |
| 814 | esac |
| 815 | do_test "ruby-nodejs" "${proto}" "${trans}-${sock}" \ |
| 816 | "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \ |
| 817 | "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 818 | "5" "2" |
| 819 | done |
| 820 | done |
| 821 | done |
| 822 | |
| 823 | for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do |
| 824 | for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do |
| 825 | case "$sock" in |
| 826 | "ip" ) extraparam="";; |
| 827 | "ip-ssl" ) extraparam="--ssl";; |
| 828 | esac |
| 829 | do_test "ruby-nodejs" "${proto}" "${trans}-${sock}" \ |
| 830 | "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \ |
| 831 | "node ${NODE_TEST_DIR}/server.js -p binary -t ${trans} ${extraparam}" \ |
| 832 | "5" "2" |
| 833 | done |
| 834 | done |
| 835 | |
| 836 | ######### nodejs client - ruby server ############## |
| 837 | for proto in $(intersection "${ruby_protocols}" "${nodejs_protocols}"); do |
| 838 | for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do |
| 839 | for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do |
| 840 | case "$sock" in |
| 841 | "ip" ) extraparam="";; |
| 842 | "ip-ssl" ) extraparam="--ssl";; |
| 843 | esac |
| 844 | do_test "nodejs-ruby" "${proto}" "${trans}-${sock}" \ |
| 845 | "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 846 | "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \ |
| 847 | "10" "5" |
| 848 | done |
| 849 | done |
| 850 | done |
| 851 | |
| 852 | for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do |
| 853 | for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do |
| 854 | case "$sock" in |
| 855 | "ip" ) extraparam="";; |
| 856 | "ip-ssl" ) extraparam="--ssl";; |
| 857 | esac |
| 858 | do_test "nodejs-ruby" "binary-accel" "${trans}-${sock}" \ |
| 859 | "node ${NODE_TEST_DIR}/client.js -p binary -t ${trans} ${extraparam}" \ |
| 860 | "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \ |
| 861 | "10" "2" |
| 862 | done |
| 863 | done |
| 864 | |
| 865 | ######### py client - ruby server ############## |
| 866 | for proto in $(intersection "${py_protocols}" "${ruby_protocols}"); do |
| 867 | for trans in $(intersection "${py_transports}" "${ruby_transports}"); do |
| 868 | for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do |
| 869 | case "$sock" in |
| 870 | "ip" ) extraparam="";; |
| 871 | "ip-ssl" ) extraparam="--ssl";; |
| 872 | esac |
| 873 | do_test "py-ruby" "${proto}" "${trans}-${sock}" \ |
| 874 | "py/TestClient.py --protocol=${proto} --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 875 | "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \ |
| 876 | "15" "5" |
| 877 | done |
| 878 | done |
| 879 | done |
| 880 | |
| 881 | for trans in $(intersection "${py_transports}" "${ruby_transports}"); do |
| 882 | for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do |
| 883 | case "$sock" in |
| 884 | "ip" ) extraparam="";; |
| 885 | "ip-ssl" ) extraparam="--ssl";; |
| 886 | esac |
| 887 | do_test "py-ruby" "${proto}" "${trans}-${sock}" \ |
| 888 | "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 889 | "ruby rb/integration/TestServer.rb --protocol=binary --transport=${trans}" \ |
| 890 | "15" "5" |
| 891 | do_test "py-ruby" "${proto}" "${trans}-${sock}" \ |
| 892 | "py/TestClient.py --protocol=binary --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 893 | "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \ |
| 894 | "15" "5" |
| 895 | done |
| 896 | done |
| 897 | |
| 898 | ######### ruby client - py server ############## |
| 899 | for proto in $(intersection "${py_protocols}" "${ruby_protocols}"); do |
| 900 | for trans in $(intersection "${py_transports}" "${ruby_transports}"); do |
| 901 | for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do |
| 902 | case "$sock" in |
| 903 | "ip" ) extraparam="";; |
| 904 | "ip-ssl" ) extraparam="--ssl";; |
| 905 | esac |
| 906 | do_test "ruby-py" "${proto}" "${trans}-${sock}" \ |
| 907 | "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \ |
| 908 | "py/TestServer.py --protocol=${proto} --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 909 | "5" "2" |
| 910 | done |
| 911 | done |
| 912 | done |
| 913 | |
| 914 | for trans in $(intersection "${py_transports}" "${ruby_transports}"); do |
| 915 | for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do |
| 916 | case "$sock" in |
| 917 | "ip" ) extraparam="";; |
| 918 | "ip-ssl" ) extraparam="--ssl";; |
| 919 | esac |
| 920 | do_test "ruby-py" "binary-accel" "${trans}-${sock}" \ |
| 921 | "ruby rb/integration/TestClient.rb --protocol=binary --transport=${trans}" \ |
| 922 | "py/TestServer.py --protocol=accel --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 923 | "5" "2" |
| 924 | do_test "ruby-py" "accel-binary" "${trans}-${sock}" \ |
| 925 | "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \ |
| 926 | "py/TestServer.py --protocol=binary --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 927 | "5" "2" |
| 928 | done |
| 929 | done |
| 930 | |
| 931 | |
Roger Meier | 691ec00 | 2012-11-02 07:50:24 +0000 | [diff] [blame] | 932 | # delete Unix Domain Socket used by cpp tests |
| 933 | rm -f /tmp/ThriftTest.thrift |
| 934 | |
Jens Geyer | c1d7943 | 2014-04-22 22:52:43 +0200 | [diff] [blame] | 935 | ######### csharp client - csharp server ############# |
| 936 | export MONO_PATH=../lib/csharp |
| 937 | for proto in $csharp_protocols; do |
| 938 | for trans in $csharp_transports; do |
| 939 | for sock in $csharp_sockets; do |
| 940 | case "$sock" in |
| 941 | "ip" ) extraparam="";; |
| 942 | "ip-ssl" ) extraparam="--ssl";; |
| 943 | esac |
| 944 | do_test "csharp-csharp" "${proto}" "${trans}-${sock}" \ |
| 945 | "../lib/csharp/test/ThriftTest/TestClientServer.exe client --protocol=${proto} --transport=${trans} ${extraparam}" \ |
| 946 | "../lib/csharp/test/ThriftTest/TestClientServer.exe server --protocol=${proto} --transport=${trans} ${extraparam}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 947 | "5" "1" |
Jens Geyer | c1d7943 | 2014-04-22 22:52:43 +0200 | [diff] [blame] | 948 | done |
| 949 | done |
| 950 | done |
| 951 | |
Roger Meier | 4edac7f | 2014-05-02 21:07:01 +0200 | [diff] [blame] | 952 | do_test "js-java" "json" "http-ip" \ |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 953 | "" \ |
| 954 | "ant -f ../lib/js/test/build.xml unittest" \ |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 955 | "2" "2" |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 956 | do_test "perl-cpp" "binary" "buffered-ip" \ |
Roger Meier | 01b568c | 2012-01-10 21:30:02 +0000 | [diff] [blame] | 957 | "perl -I perl/gen-perl/ -I../lib/perl/lib/ perl/TestClient.pl" \ |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 958 | "cpp/TestServer" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 959 | "10" "2" |
Roger Meier | b33967b | 2012-01-21 09:18:05 +0000 | [diff] [blame] | 960 | do_test "php-cpp" "binary" "buffered-ip" \ |
| 961 | "make -C php/ client" \ |
| 962 | "cpp/TestServer" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 963 | "10" "2" |
Roger Meier | 4edac7f | 2014-05-02 21:07:01 +0200 | [diff] [blame] | 964 | |
| 965 | echo " failed tests are logged to test/log/error.log" |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 966 | echo " full log is here test/log/client_server_protocol_transport_client.log" |
| 967 | echo " full log is here test/log/client_server_protocol_transport_server.log" |
| 968 | echo " or look at file://$BASEDIR/$STATUS_HTML" |
| 969 | |
henrique | ad4df16 | 2014-05-20 13:18:45 +0200 | [diff] [blame] | 970 | ELAPSED_TIME=$(echo "(${SECONDS} - ${START_TIME})" | bc) |
| 971 | DURATION="${ELAPSED_TIME} seconds" |
Roger Meier | bea2734 | 2014-08-08 00:30:50 +0200 | [diff] [blame] | 972 | |
| 973 | echo $FAILED failed of $TESTCOUNT tests in total |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 974 | echo "test an took" $DURATION |
| 975 | print_html_footer "$DURATION" |
| 976 | |
Roger Meier | 4edac7f | 2014-05-02 21:07:01 +0200 | [diff] [blame] | 977 | date |
Roger Meier | 8252577 | 2012-11-16 00:38:27 +0000 | [diff] [blame] | 978 | cd - |