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" \ |
Noam Zilberstein | af5d64a | 2014-07-31 15:44:13 -0700 | [diff] [blame] | 278 | "5" "1" |
| 279 | done |
| 280 | done |
| 281 | done |
| 282 | |
| 283 | ######### java client - hs server ############### |
| 284 | for proto in $(intersection "${hs_protocols}" "${java_protocols}"); do |
| 285 | for trans in $(intersection "${hs_transports}" "${java_transports}"); do |
| 286 | for sock in $(intersection "${hs_sockets}" "${java_sockets}"); do |
| 287 | case "$sock" in |
| 288 | "ip" ) extraparam="";; |
| 289 | "ip-ssl" ) extraparam="--ssl";; |
| 290 | "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";; |
| 291 | esac |
| 292 | do_test "java-hs" "${proto}" "${trans}-${sock}" \ |
| 293 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \ |
| 294 | "hs/TestServer --protocol ${proto} --transport ${trans} ${extraparam}" \ |
| 295 | "5" "1" |
| 296 | done |
| 297 | done |
| 298 | done |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 299 | |
| 300 | ######### java client - java server ############# |
| 301 | for proto in $java_protocols; do |
| 302 | for trans in $java_server_transports; do |
| 303 | for sock in $java_sockets; do |
| 304 | case "$sock" in |
| 305 | "ip" ) extraparam="";; |
| 306 | "ip-ssl" ) extraparam="--ssl";; |
| 307 | esac |
| 308 | do_test "java-java" "${proto}" "${trans}-${sock}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 309 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \ |
| 310 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \ |
| 311 | "5" "1" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 312 | done |
| 313 | done |
| 314 | done |
| 315 | |
| 316 | ######### cpp client - cpp server ############### |
| 317 | for proto in $cpp_protocols; do |
| 318 | for trans in $cpp_transports; do |
| 319 | for sock in $cpp_sockets; do |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 320 | case "$sock" in |
| 321 | "ip" ) extraparam="";; |
| 322 | "ip-ssl" ) extraparam="--ssl";; |
| 323 | "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";; |
| 324 | esac |
| 325 | do_test "cpp-cpp" "${proto}" "${trans}-${sock}" \ |
| 326 | "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \ |
| 327 | "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 328 | "2" "0.1" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 329 | done |
| 330 | done |
| 331 | done |
| 332 | |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 333 | |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 334 | ######### java client - cpp server ############## |
| 335 | # warning: ssl over http is not supported in java client! |
| 336 | for proto in $(intersection "${java_protocols}" "${cpp_protocols}"); do |
| 337 | for trans in $(intersection "${java_client_transports}" "${cpp_transports}"); do |
| 338 | for sock in $(intersection "${java_sockets}" "${cpp_sockets}"); do |
| 339 | case "$sock" in |
| 340 | "ip" ) extraparam="";; |
| 341 | "ip-ssl" ) extraparam="--ssl";; |
| 342 | esac |
Roger Meier | 188024e | 2014-04-17 21:53:45 +0200 | [diff] [blame] | 343 | do_test "java-cpp" "${proto}" "${trans}-${sock}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 344 | "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] | 345 | "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}"\ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 346 | "5" "0.1" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 347 | done |
| 348 | done |
| 349 | done |
| 350 | |
| 351 | ######### cpp client - java server ############## |
| 352 | for proto in $(intersection "${cpp_protocols}" "${java_protocols}"); do |
| 353 | for trans in $(intersection "${cpp_transports}" "${java_server_transports}"); do |
| 354 | for sock in $(intersection "${java_sockets}" "${cpp_sockets}"); do |
| 355 | case "$sock" in |
| 356 | "ip" ) extraparam="";; |
| 357 | "ip-ssl" ) extraparam="--ssl";; |
| 358 | esac |
Roger Meier | 188024e | 2014-04-17 21:53:45 +0200 | [diff] [blame] | 359 | do_test "cpp-java" "${proto}" "${trans}-${sock}" \ |
| 360 | "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 361 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \ |
| 362 | "5" "1" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 363 | done |
| 364 | done |
| 365 | done |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 366 | |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 367 | |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 368 | NODE_TEST_DIR=${BASEDIR}/../lib/nodejs/test |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 369 | export NODE_PATH=${NODE_TEST_DIR}:${NODE_TEST_DIR}/../lib:${NODE_PATH} |
Roger Meier | d9b331d | 2014-05-25 22:59:17 +0200 | [diff] [blame] | 370 | ######### nodejs client - nodejs server ############## |
Roger Meier | d9b331d | 2014-05-25 22:59:17 +0200 | [diff] [blame] | 371 | for proto in ${nodejs_protocols}; do |
| 372 | for trans in ${nodejs_transports}; do |
| 373 | for sock in ${nodejs_sockets}; do |
| 374 | case "$sock" in |
| 375 | "ip" ) extraparam="";; |
| 376 | "ip-ssl" ) extraparam="--ssl";; |
| 377 | esac |
| 378 | do_test "nodejs-nodejs" "${proto}" "${trans}-${sock}" \ |
| 379 | "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 380 | "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 381 | "5" "0.2" |
| 382 | done |
| 383 | done |
| 384 | done |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 385 | |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 386 | ######### nodejs client - cpp server ############## |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 387 | for proto in $(intersection "${nodejs_protocols}" "${cpp_protocols}"); do |
| 388 | for trans in $(intersection "${nodejs_transports}" "${cpp_transports}"); do |
| 389 | for sock in $(intersection "${nodejs_sockets}" "${cpp_sockets}"); do |
Roger Meier | 57b354b | 2014-02-22 01:01:58 +0100 | [diff] [blame] | 390 | case "$sock" in |
| 391 | "ip" ) extraparam="";; |
| 392 | "ip-ssl" ) extraparam="--ssl";; |
| 393 | esac |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 394 | do_test "nodejs-cpp" "${proto}" "${trans}-${sock}" \ |
| 395 | "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \ |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 396 | "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 397 | "5" "0.2" |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 398 | done |
| 399 | done |
| 400 | done |
| 401 | |
| 402 | ######### cpp client - nodejs server ############## |
| 403 | for proto in $(intersection "${nodejs_protocols}" "${cpp_protocols}"); do |
| 404 | for trans in $(intersection "${nodejs_transports}" "${cpp_transports}"); do |
| 405 | for sock in $(intersection "${nodejs_sockets}" "${cpp_sockets}"); do |
Roger Meier | 57b354b | 2014-02-22 01:01:58 +0100 | [diff] [blame] | 406 | case "$sock" in |
| 407 | "ip" ) extraparam="";; |
| 408 | "ip-ssl" ) extraparam="--ssl";; |
| 409 | esac |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 410 | do_test "cpp-nodejs" "${proto}" "${trans}-${sock}" \ |
Roger Meier | 57b354b | 2014-02-22 01:01:58 +0100 | [diff] [blame] | 411 | "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \ |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 412 | "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 413 | "5" "2" |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 414 | done |
| 415 | done |
| 416 | done |
| 417 | |
Roger Meier | 5c6ad24 | 2014-05-27 21:18:00 +0200 | [diff] [blame] | 418 | ######### nodejs client - java server ############## |
Roger Meier | 5c6ad24 | 2014-05-27 21:18:00 +0200 | [diff] [blame] | 419 | for proto in $(intersection "${nodejs_protocols}" "${java_protocols}"); do |
| 420 | for trans in $(intersection "${nodejs_transports}" "${java_server_transports}"); do |
| 421 | for sock in $(intersection "${nodejs_sockets}" "${java_sockets}"); do |
| 422 | case "$sock" in |
| 423 | "ip" ) extraparam="";; |
| 424 | "ip-ssl" ) extraparam="--ssl";; |
| 425 | esac |
| 426 | do_test "nodejs-java" "${proto}" "${trans}-${sock}" \ |
| 427 | "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 428 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \ |
| 429 | "5" "1" |
| 430 | done |
| 431 | done |
| 432 | done |
| 433 | |
| 434 | ######### java client - nodejs server ############## |
| 435 | for proto in $(intersection "${nodejs_protocols}" "${java_protocols}"); do |
| 436 | for trans in $(intersection "${nodejs_transports}" "${java_client_transports}"); do |
| 437 | for sock in $(intersection "${nodejs_sockets}" "${java_sockets}"); do |
| 438 | case "$sock" in |
| 439 | "ip" ) extraparam="";; |
| 440 | "ip-ssl" ) extraparam="--ssl";; |
| 441 | esac |
| 442 | do_test "java-nodejs" "${proto}" "${trans}-${sock}" \ |
| 443 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \ |
| 444 | "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 445 | "5" "2" |
| 446 | done |
| 447 | done |
| 448 | done |
| 449 | |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 450 | ######### py client - py server ############## |
| 451 | for proto in ${py_protocols}; do |
| 452 | for trans in ${py_transports}; do |
| 453 | for sock in ${py_sockets}; do |
| 454 | case "$sock" in |
| 455 | "ip" ) extraparam="";; |
| 456 | "ip-ssl" ) extraparam="--ssl";; |
| 457 | esac |
| 458 | do_test "py-py" "${proto}" "${trans}-${sock}" \ |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 459 | "py/TestClient.py --protocol=${proto} --transport={trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 460 | "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] | 461 | "10" "2" |
| 462 | done |
| 463 | done |
| 464 | done |
| 465 | |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 466 | for trans in ${py_transports}; do |
| 467 | for sock in ${py_sockets}; do |
| 468 | case "$sock" in |
| 469 | "ip" ) extraparam="";; |
| 470 | "ip-ssl" ) extraparam="--ssl";; |
| 471 | esac |
| 472 | do_test "py-py" "accel-binary" "${trans}-${sock}" \ |
| 473 | "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 474 | "py/TestServer.py --protocol=binary --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 475 | "10" "2" |
| 476 | do_test "py-py" "binary-accel" "${trans}-${sock}" \ |
| 477 | "py/TestClient.py --protocol=binary --transport={trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 478 | "py/TestServer.py --protocol=accel --transport={trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 479 | "10" "2" |
| 480 | done |
| 481 | done |
| 482 | |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 483 | ######### py client - cpp server ############## |
| 484 | for proto in $(intersection "${cpp_protocols}" "${py_protocols}"); do |
| 485 | for trans in $(intersection "${cpp_transports}" "${py_transports}"); do |
| 486 | for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do |
| 487 | case "$sock" in |
| 488 | "ip" ) extraparam="";; |
| 489 | "ip-ssl" ) extraparam="--ssl";; |
| 490 | esac |
| 491 | do_test "py-cpp" "${proto}" "${trans}-${sock}" \ |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 492 | "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] | 493 | "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \ |
| 494 | "10" "2" |
| 495 | done |
| 496 | done |
| 497 | done |
| 498 | |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 499 | for trans in $(intersection "${cpp_transports}" "${py_transports}"); do |
| 500 | for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do |
| 501 | case "$sock" in |
| 502 | "ip" ) extraparam="";; |
| 503 | "ip-ssl" ) extraparam="--ssl";; |
| 504 | esac |
| 505 | do_test "py-cpp" "accel-binary" "${trans}-${sock}" \ |
| 506 | "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 507 | "cpp/TestServer --protocol=binary --transport=${trans} ${extraparam}" \ |
| 508 | "10" "2" |
| 509 | done |
| 510 | done |
| 511 | |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 512 | ######### cpp client - py server ############## |
| 513 | for proto in $(intersection "${cpp_protocols}" "${py_protocols}"); do |
| 514 | for trans in $(intersection "${cpp_transports}" "${py_transports}"); do |
| 515 | for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do |
| 516 | case "$sock" in |
| 517 | "ip" ) extraparam="";; |
| 518 | "ip-ssl" ) extraparam="--ssl";; |
| 519 | esac |
| 520 | do_test "cpp-py" "${proto}" "${trans}-${sock}" \ |
| 521 | "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \ |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 522 | "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] | 523 | "10" "2" |
| 524 | done |
| 525 | done |
| 526 | done |
| 527 | |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 528 | for trans in $(intersection "${cpp_transports}" "${py_transports}"); do |
| 529 | for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do |
| 530 | case "$sock" in |
| 531 | "ip" ) extraparam="";; |
| 532 | "ip-ssl" ) extraparam="--ssl";; |
| 533 | esac |
| 534 | do_test "cpp-py" "binary-accel" "${trans}-${sock}" \ |
| 535 | "cpp/TestClient --protocol=binary --transport=${trans} ${extraparam}" \ |
| 536 | "py/TestServer.py --protocol=accel --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 537 | "10" "2" |
| 538 | done |
| 539 | done |
| 540 | |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 541 | ######### py client - java server ############## |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 542 | for proto in $(intersection "${py_protocols}" "${java_protocols}"); do |
| 543 | for trans in $(intersection "${py_transports}" "${java_server_transports}"); do |
| 544 | for sock in $(intersection "${py_sockets}" "${java_sockets}"); do |
| 545 | case "$sock" in |
| 546 | "ip" ) extraparam="";; |
| 547 | "ip-ssl" ) extraparam="--ssl";; |
| 548 | esac |
| 549 | do_test "py-java" "${proto}" "${trans}-${sock}" \ |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 550 | "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] | 551 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \ |
| 552 | "15" "2" |
| 553 | done |
| 554 | done |
| 555 | done |
| 556 | |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 557 | for trans in $(intersection "${py_transports}" "${java_server_transports}"); do |
| 558 | for sock in $(intersection "${py_sockets}" "${java_sockets}"); do |
| 559 | case "$sock" in |
| 560 | "ip" ) extraparam="";; |
| 561 | "ip-ssl" ) extraparam="--ssl";; |
| 562 | esac |
| 563 | do_test "py-java" "accel-binary" "${trans}-${sock}" \ |
| 564 | "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 565 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} ${extraparam}\" run-testserver" \ |
| 566 | "15" "2" |
| 567 | done |
| 568 | done |
| 569 | |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 570 | ######### java client - py server ############## |
| 571 | for proto in $(intersection "${py_protocols}" "${java_protocols}"); do |
| 572 | for trans in $(intersection "${py_transports}" "${java_client_transports}"); do |
| 573 | for sock in $(intersection "${py_sockets}" "${java_sockets}"); do |
| 574 | case "$sock" in |
| 575 | "ip" ) extraparam="";; |
| 576 | "ip-ssl" ) extraparam="--ssl";; |
| 577 | esac |
| 578 | do_test "java-py" "${proto}" "${trans}-${sock}" \ |
| 579 | "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] | 580 | "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] | 581 | "10" "5" |
| 582 | done |
| 583 | done |
| 584 | done |
| 585 | |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 586 | for trans in $(intersection "${py_transports}" "${java_client_transports}"); do |
| 587 | for sock in $(intersection "${py_sockets}" "${java_sockets}"); do |
| 588 | case "$sock" in |
| 589 | "ip" ) extraparam="";; |
| 590 | "ip-ssl" ) extraparam="--ssl";; |
| 591 | esac |
| 592 | do_test "java-py" "binary-accel" "${trans}-${sock}" \ |
| 593 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} ${extraparam}\" run-testclient" \ |
| 594 | "py/TestServer.py --protocol=accel --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 595 | "10" "5" |
| 596 | done |
| 597 | done |
| 598 | |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 599 | ######### py client - nodejs server ############## |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 600 | for proto in $(intersection "${py_protocols}" "${nodejs_protocols}"); do |
| 601 | for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do |
| 602 | for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do |
| 603 | case "$sock" in |
| 604 | "ip" ) extraparam="";; |
| 605 | "ip-ssl" ) extraparam="--ssl";; |
| 606 | esac |
| 607 | do_test "py-nodejs" "${proto}" "${trans}-${sock}" \ |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 608 | "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] | 609 | "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 610 | "15" "2" |
| 611 | done |
| 612 | done |
| 613 | done |
| 614 | |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 615 | for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do |
| 616 | for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do |
| 617 | case "$sock" in |
| 618 | "ip" ) extraparam="";; |
| 619 | "ip-ssl" ) extraparam="--ssl";; |
| 620 | esac |
| 621 | do_test "py-nodejs" "${proto}" "${trans}-${sock}" \ |
| 622 | "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 623 | "node ${NODE_TEST_DIR}/server.js -p binary -t ${trans} ${extraparam}" \ |
| 624 | "15" "2" |
| 625 | done |
| 626 | done |
| 627 | |
Roger Meier | 72268b7 | 2014-05-28 23:03:57 +0200 | [diff] [blame] | 628 | ######### nodejs client - py server ############## |
| 629 | for proto in $(intersection "${py_protocols}" "${nodejs_protocols}"); do |
| 630 | for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do |
| 631 | for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do |
| 632 | case "$sock" in |
| 633 | "ip" ) extraparam="";; |
| 634 | "ip-ssl" ) extraparam="--ssl";; |
| 635 | esac |
| 636 | do_test "nodejs-py" "${proto}" "${trans}-${sock}" \ |
| 637 | "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \ |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 638 | "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] | 639 | "10" "2" |
| 640 | done |
| 641 | done |
| 642 | done |
| 643 | |
Roger Meier | 7615072 | 2014-05-31 22:22:07 +0200 | [diff] [blame] | 644 | for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do |
| 645 | for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do |
| 646 | case "$sock" in |
| 647 | "ip" ) extraparam="";; |
| 648 | "ip-ssl" ) extraparam="--ssl";; |
| 649 | esac |
| 650 | do_test "nodejs-py" "binary-accel" "${trans}-${sock}" \ |
| 651 | "node ${NODE_TEST_DIR}/client.js -p binary -t ${trans} ${extraparam}" \ |
| 652 | "py/TestServer.py --protocol=accel --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 653 | "10" "2" |
| 654 | done |
| 655 | done |
| 656 | |
Roger Meier | a3570ac | 2014-06-10 22:16:14 +0200 | [diff] [blame] | 657 | ######### ruby client - ruby server ############## |
| 658 | for proto in ${ruby_protocols}; do |
| 659 | for trans in ${ruby_transports}; do |
| 660 | for sock in ${ruby_sockets}; do |
| 661 | case "$sock" in |
| 662 | "ip" ) extraparam="";; |
| 663 | "ip-ssl" ) extraparam="--ssl";; |
| 664 | esac |
| 665 | do_test "ruby-ruby" "${proto}" "${trans}-${sock}" \ |
| 666 | "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=9091" \ |
| 667 | "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=9091" \ |
| 668 | "5" "5" |
| 669 | done |
| 670 | done |
| 671 | done |
| 672 | |
| 673 | for trans in ${ruby_transports}; do |
| 674 | for sock in ${ruby_sockets}; do |
| 675 | case "$sock" in |
| 676 | "ip" ) extraparam="";; |
| 677 | "ip-ssl" ) extraparam="--ssl";; |
| 678 | esac |
| 679 | do_test "ruby-ruby" "accel-binary" "${trans}-${sock}" \ |
| 680 | "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=9091" \ |
| 681 | "ruby rb/integration/TestServer.rb --protocol=binary --transport=${trans} --port=9091" \ |
| 682 | "5" "5" |
| 683 | do_test "ruby-ruby" "binary-accel" "${trans}-${sock}" \ |
| 684 | "ruby rb/integration/TestClient.rb --protocol=binary --transport=${trans} --port=9091" \ |
| 685 | "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=9091" \ |
| 686 | "5" "5" |
| 687 | done |
| 688 | done |
| 689 | |
| 690 | ######### ruby client - cpp server ############## |
| 691 | for proto in $(intersection "${cpp_protocols}" "${ruby_protocols}"); do |
| 692 | for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do |
| 693 | for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do |
| 694 | case "$sock" in |
| 695 | "ip" ) extraparam="";; |
| 696 | "ip-ssl" ) extraparam="--ssl";; |
| 697 | esac |
| 698 | do_test "ruby-cpp" "${proto}" "${trans}-${sock}" \ |
| 699 | "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \ |
| 700 | "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \ |
| 701 | "5" "5" |
| 702 | done |
| 703 | done |
| 704 | done |
| 705 | |
| 706 | for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do |
| 707 | for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do |
| 708 | case "$sock" in |
| 709 | "ip" ) extraparam="";; |
| 710 | "ip-ssl" ) extraparam="--ssl";; |
| 711 | esac |
| 712 | do_test "ruby-cpp" "accel-binary" "${trans}-${sock}" \ |
| 713 | "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \ |
| 714 | "cpp/TestServer --protocol=binary --transport=${trans} ${extraparam}" \ |
| 715 | "5" "5" |
| 716 | done |
| 717 | done |
| 718 | |
| 719 | ######### cpp client - ruby server ############## |
| 720 | for proto in $(intersection "${cpp_protocols}" "${ruby_protocols}"); do |
| 721 | for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do |
| 722 | for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do |
| 723 | case "$sock" in |
| 724 | "ip" ) extraparam="";; |
| 725 | "ip-ssl" ) extraparam="--ssl";; |
| 726 | esac |
| 727 | do_test "cpp-ruby" "${proto}" "${trans}-${sock}" \ |
| 728 | "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \ |
| 729 | "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \ |
| 730 | "5" "5" |
| 731 | done |
| 732 | done |
| 733 | done |
| 734 | |
| 735 | for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do |
| 736 | for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do |
| 737 | case "$sock" in |
| 738 | "ip" ) extraparam="";; |
| 739 | "ip-ssl" ) extraparam="--ssl";; |
| 740 | esac |
| 741 | do_test "cpp-ruby" "binary-accel" "${trans}-${sock}" \ |
| 742 | "cpp/TestClient --protocol=binary --transport=${trans} ${extraparam}" \ |
| 743 | "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \ |
| 744 | "5" "5" |
| 745 | done |
| 746 | done |
| 747 | |
| 748 | ######### ruby client - java server ############## |
| 749 | for proto in $(intersection "${ruby_protocols}" "${java_protocols}"); do |
| 750 | for trans in $(intersection "${ruby_transports}" "${java_server_transports}"); do |
| 751 | for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do |
| 752 | case "$sock" in |
| 753 | "ip" ) extraparam="";; |
| 754 | "ip-ssl" ) extraparam="--ssl";; |
| 755 | esac |
| 756 | do_test "ruby-java" "${proto}" "${trans}-${sock}" \ |
| 757 | "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \ |
| 758 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \ |
| 759 | "15" "5" |
| 760 | done |
| 761 | done |
| 762 | done |
| 763 | |
| 764 | for trans in $(intersection "${ruby_transports}" "${java_server_transports}"); do |
| 765 | for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do |
| 766 | case "$sock" in |
| 767 | "ip" ) extraparam="";; |
| 768 | "ip-ssl" ) extraparam="--ssl";; |
| 769 | esac |
| 770 | do_test "ruby-java" "accel-binary" "${trans}-${sock}" \ |
| 771 | "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \ |
| 772 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} ${extraparam}\" run-testserver" \ |
| 773 | "15" "5" |
| 774 | done |
| 775 | done |
| 776 | |
| 777 | ######### java client - ruby server ############## |
| 778 | for proto in $(intersection "${ruby_protocols}" "${java_protocols}"); do |
| 779 | for trans in $(intersection "${ruby_transports}" "${java_client_transports}"); do |
| 780 | for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do |
| 781 | case "$sock" in |
| 782 | "ip" ) extraparam="";; |
| 783 | "ip-ssl" ) extraparam="--ssl";; |
| 784 | esac |
| 785 | do_test "java-ruby" "${proto}" "${trans}-${sock}" \ |
| 786 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \ |
| 787 | "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \ |
| 788 | "10" "5" |
| 789 | done |
| 790 | done |
| 791 | done |
| 792 | |
| 793 | for trans in $(intersection "${ruby_transports}" "${java_client_transports}"); do |
| 794 | for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do |
| 795 | case "$sock" in |
| 796 | "ip" ) extraparam="";; |
| 797 | "ip-ssl" ) extraparam="--ssl";; |
| 798 | esac |
| 799 | do_test "java-ruby" "binary-accel" "${trans}-${sock}" \ |
| 800 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} ${extraparam}\" run-testclient" \ |
| 801 | "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \ |
| 802 | "10" "5" |
| 803 | done |
| 804 | done |
| 805 | |
| 806 | ######### ruby client - nodejs server ############## |
| 807 | for proto in $(intersection "${ruby_protocols}" "${nodejs_protocols}"); do |
| 808 | for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do |
| 809 | for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do |
| 810 | case "$sock" in |
| 811 | "ip" ) extraparam="";; |
| 812 | "ip-ssl" ) extraparam="--ssl";; |
| 813 | esac |
| 814 | do_test "ruby-nodejs" "${proto}" "${trans}-${sock}" \ |
| 815 | "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \ |
| 816 | "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 817 | "5" "2" |
| 818 | done |
| 819 | done |
| 820 | done |
| 821 | |
| 822 | for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do |
| 823 | for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do |
| 824 | case "$sock" in |
| 825 | "ip" ) extraparam="";; |
| 826 | "ip-ssl" ) extraparam="--ssl";; |
| 827 | esac |
| 828 | do_test "ruby-nodejs" "${proto}" "${trans}-${sock}" \ |
| 829 | "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \ |
| 830 | "node ${NODE_TEST_DIR}/server.js -p binary -t ${trans} ${extraparam}" \ |
| 831 | "5" "2" |
| 832 | done |
| 833 | done |
| 834 | |
| 835 | ######### nodejs client - ruby server ############## |
| 836 | for proto in $(intersection "${ruby_protocols}" "${nodejs_protocols}"); do |
| 837 | for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do |
| 838 | for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do |
| 839 | case "$sock" in |
| 840 | "ip" ) extraparam="";; |
| 841 | "ip-ssl" ) extraparam="--ssl";; |
| 842 | esac |
| 843 | do_test "nodejs-ruby" "${proto}" "${trans}-${sock}" \ |
| 844 | "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 845 | "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \ |
| 846 | "10" "5" |
| 847 | done |
| 848 | done |
| 849 | done |
| 850 | |
| 851 | for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do |
| 852 | for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do |
| 853 | case "$sock" in |
| 854 | "ip" ) extraparam="";; |
| 855 | "ip-ssl" ) extraparam="--ssl";; |
| 856 | esac |
| 857 | do_test "nodejs-ruby" "binary-accel" "${trans}-${sock}" \ |
| 858 | "node ${NODE_TEST_DIR}/client.js -p binary -t ${trans} ${extraparam}" \ |
| 859 | "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \ |
| 860 | "10" "2" |
| 861 | done |
| 862 | done |
| 863 | |
| 864 | ######### py client - ruby server ############## |
| 865 | for proto in $(intersection "${py_protocols}" "${ruby_protocols}"); do |
| 866 | for trans in $(intersection "${py_transports}" "${ruby_transports}"); do |
| 867 | for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do |
| 868 | case "$sock" in |
| 869 | "ip" ) extraparam="";; |
| 870 | "ip-ssl" ) extraparam="--ssl";; |
| 871 | esac |
| 872 | do_test "py-ruby" "${proto}" "${trans}-${sock}" \ |
| 873 | "py/TestClient.py --protocol=${proto} --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 874 | "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans}" \ |
| 875 | "15" "5" |
| 876 | done |
| 877 | done |
| 878 | done |
| 879 | |
| 880 | for trans in $(intersection "${py_transports}" "${ruby_transports}"); do |
| 881 | for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do |
| 882 | case "$sock" in |
| 883 | "ip" ) extraparam="";; |
| 884 | "ip-ssl" ) extraparam="--ssl";; |
| 885 | esac |
| 886 | do_test "py-ruby" "${proto}" "${trans}-${sock}" \ |
| 887 | "py/TestClient.py --protocol=accel --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 888 | "ruby rb/integration/TestServer.rb --protocol=binary --transport=${trans}" \ |
| 889 | "15" "5" |
| 890 | do_test "py-ruby" "${proto}" "${trans}-${sock}" \ |
| 891 | "py/TestClient.py --protocol=binary --transport=${trans} --port=9090 --host=localhost --genpydir=py/gen-py ${extraparam}" \ |
| 892 | "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans}" \ |
| 893 | "15" "5" |
| 894 | done |
| 895 | done |
| 896 | |
| 897 | ######### ruby client - py server ############## |
| 898 | for proto in $(intersection "${py_protocols}" "${ruby_protocols}"); do |
| 899 | for trans in $(intersection "${py_transports}" "${ruby_transports}"); do |
| 900 | for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do |
| 901 | case "$sock" in |
| 902 | "ip" ) extraparam="";; |
| 903 | "ip-ssl" ) extraparam="--ssl";; |
| 904 | esac |
| 905 | do_test "ruby-py" "${proto}" "${trans}-${sock}" \ |
| 906 | "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans}" \ |
| 907 | "py/TestServer.py --protocol=${proto} --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 908 | "5" "2" |
| 909 | done |
| 910 | done |
| 911 | done |
| 912 | |
| 913 | for trans in $(intersection "${py_transports}" "${ruby_transports}"); do |
| 914 | for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do |
| 915 | case "$sock" in |
| 916 | "ip" ) extraparam="";; |
| 917 | "ip-ssl" ) extraparam="--ssl";; |
| 918 | esac |
| 919 | do_test "ruby-py" "binary-accel" "${trans}-${sock}" \ |
| 920 | "ruby rb/integration/TestClient.rb --protocol=binary --transport=${trans}" \ |
| 921 | "py/TestServer.py --protocol=accel --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 922 | "5" "2" |
| 923 | do_test "ruby-py" "accel-binary" "${trans}-${sock}" \ |
| 924 | "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans}" \ |
| 925 | "py/TestServer.py --protocol=binary --transport=${trans} --port=9090 --genpydir=py/gen-py TSimpleServer ${extraparam}" \ |
| 926 | "5" "2" |
| 927 | done |
| 928 | done |
| 929 | |
| 930 | |
Roger Meier | 691ec00 | 2012-11-02 07:50:24 +0000 | [diff] [blame] | 931 | # delete Unix Domain Socket used by cpp tests |
| 932 | rm -f /tmp/ThriftTest.thrift |
| 933 | |
Jens Geyer | c1d7943 | 2014-04-22 22:52:43 +0200 | [diff] [blame] | 934 | ######### csharp client - csharp server ############# |
| 935 | export MONO_PATH=../lib/csharp |
| 936 | for proto in $csharp_protocols; do |
| 937 | for trans in $csharp_transports; do |
| 938 | for sock in $csharp_sockets; do |
| 939 | case "$sock" in |
| 940 | "ip" ) extraparam="";; |
| 941 | "ip-ssl" ) extraparam="--ssl";; |
| 942 | esac |
| 943 | do_test "csharp-csharp" "${proto}" "${trans}-${sock}" \ |
| 944 | "../lib/csharp/test/ThriftTest/TestClientServer.exe client --protocol=${proto} --transport=${trans} ${extraparam}" \ |
| 945 | "../lib/csharp/test/ThriftTest/TestClientServer.exe server --protocol=${proto} --transport=${trans} ${extraparam}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 946 | "5" "1" |
Jens Geyer | c1d7943 | 2014-04-22 22:52:43 +0200 | [diff] [blame] | 947 | done |
| 948 | done |
| 949 | done |
| 950 | |
Roger Meier | 4edac7f | 2014-05-02 21:07:01 +0200 | [diff] [blame] | 951 | do_test "js-java" "json" "http-ip" \ |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 952 | "" \ |
| 953 | "ant -f ../lib/js/test/build.xml unittest" \ |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 954 | "2" "2" |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 955 | do_test "perl-cpp" "binary" "buffered-ip" \ |
Roger Meier | 01b568c | 2012-01-10 21:30:02 +0000 | [diff] [blame] | 956 | "perl -I perl/gen-perl/ -I../lib/perl/lib/ perl/TestClient.pl" \ |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 957 | "cpp/TestServer" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 958 | "10" "2" |
Roger Meier | b33967b | 2012-01-21 09:18:05 +0000 | [diff] [blame] | 959 | do_test "php-cpp" "binary" "buffered-ip" \ |
| 960 | "make -C php/ client" \ |
| 961 | "cpp/TestServer" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 962 | "10" "2" |
Roger Meier | 4edac7f | 2014-05-02 21:07:01 +0200 | [diff] [blame] | 963 | |
| 964 | echo " failed tests are logged to test/log/error.log" |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 965 | echo " full log is here test/log/client_server_protocol_transport_client.log" |
| 966 | echo " full log is here test/log/client_server_protocol_transport_server.log" |
| 967 | echo " or look at file://$BASEDIR/$STATUS_HTML" |
| 968 | |
henrique | ad4df16 | 2014-05-20 13:18:45 +0200 | [diff] [blame] | 969 | ELAPSED_TIME=$(echo "(${SECONDS} - ${START_TIME})" | bc) |
| 970 | DURATION="${ELAPSED_TIME} seconds" |
Roger Meier | bea2734 | 2014-08-08 00:30:50 +0200 | [diff] [blame] | 971 | |
| 972 | echo $FAILED failed of $TESTCOUNT tests in total |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 973 | echo "test an took" $DURATION |
| 974 | print_html_footer "$DURATION" |
| 975 | |
Roger Meier | 4edac7f | 2014-05-02 21:07:01 +0200 | [diff] [blame] | 976 | date |
Roger Meier | 8252577 | 2012-11-16 00:38:27 +0000 | [diff] [blame] | 977 | cd - |