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 | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 33 | print_header() { |
| 34 | printf "%-16s %-11s %-17s %-s\n" "client-server:" "protocol:" "transport:" "result:" |
| 35 | } |
| 36 | |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 37 | STATUS_HTML="status.html" |
| 38 | |
| 39 | print_html_header() { |
| 40 | cat << EOF > $STATUS_HTML |
| 41 | <!DOCTYPE HTML> |
| 42 | <html> |
| 43 | <head> |
| 44 | <meta charset="utf-8"> |
| 45 | <title>Apache Thrift - integration test suite</title> |
| 46 | <link rel="stylesheet" type="text/css" href="http://cdn.datatables.net/1.10.0/css/jquery.dataTables.css"> |
| 47 | <script type="text/javascript" charset="utf-8" src="http://code.jquery.com/jquery-1.10.2.min.js"></script> |
| 48 | <script type="text/javascript" charset="utf-8" src="http://cdn.datatables.net/1.10.0/js/jquery.dataTables.js"></script> |
| 49 | <script> |
| 50 | var test_data; |
| 51 | \$(document).ready( function () { |
| 52 | testTable = \$('#test_results').DataTable( { |
| 53 | data: test_data |
| 54 | }); |
| 55 | \$('#test_results_filter label input') |
| 56 | .focus() |
| 57 | .val('failure'); |
| 58 | }); |
| 59 | </script> |
| 60 | </head> |
| 61 | <body> |
| 62 | <h2>Apache Thrift - integration test suite: Results</h2> |
| 63 | <table id="test_results" class="display"> |
| 64 | <thead> |
| 65 | <tr> |
| 66 | <th>Server</th> |
| 67 | <th>Client</th> |
| 68 | <th>Protocol</th> |
| 69 | <th>Transport</th> |
| 70 | <th>Result (log)</th> |
| 71 | </tr> |
| 72 | </thead> |
| 73 | </table> |
| 74 | <script> |
| 75 | test_data = [ |
| 76 | EOF |
| 77 | } |
| 78 | |
| 79 | print_html_footer() { |
| 80 | duration=$1 |
| 81 | cat << EOF >> $STATUS_HTML |
| 82 | ] |
| 83 | </script> |
| 84 | <h2>Test Information</h2> |
| 85 | <pre> |
| 86 | Test Date: `date --iso-8601=seconds` |
| 87 | Revision: `git rev-parse --short HEAD` |
| 88 | OS: `uname -a` |
| 89 | Test duration: $duration |
| 90 | </pre> |
| 91 | </body> |
| 92 | </html> |
| 93 | EOF |
| 94 | } |
| 95 | |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 96 | intersection() { |
| 97 | return_value="" |
| 98 | for one in $1; do |
| 99 | for two in $2; do |
| 100 | if [ ${one} = ${two} ]; then |
| 101 | return_value=${return_value}" "${one} |
| 102 | fi |
| 103 | done; |
| 104 | done; |
| 105 | echo ${return_value}; |
| 106 | } |
| 107 | |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 108 | do_test () { |
| 109 | client_server=$1 |
| 110 | protocol=$2 |
| 111 | transport=$3 |
| 112 | client_exec=$4 |
| 113 | server_exec=$5 |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 114 | client_timeout=$6 |
| 115 | server_startup_time=$7 |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 116 | |
| 117 | testname=${client_server}_${protocol}_${transport} |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 118 | server_timeout=$(echo "(${server_startup_time}+${client_timeout})" | bc) |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 119 | printf "%-16s %-11s %-17s" ${client_server} ${protocol} ${transport} |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 120 | |
Roger Meier | 284101c | 2014-03-11 21:20:35 +0100 | [diff] [blame] | 121 | timeout $server_timeout $server_exec > log/${testname}_server.log 2>&1 & |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 122 | server_pid=$! |
| 123 | |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 124 | sleep $server_startup_time |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 125 | timeout $client_timeout $client_exec > log/${testname}_client.log 2>&1 |
Ben Craig | f41d79d | 2014-01-08 15:15:48 -0600 | [diff] [blame] | 126 | |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 127 | if [ "$?" -eq "0" ]; then |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 128 | result="success($?)" |
| 129 | echo " $result" |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 130 | else |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 131 | result="failure($?)" |
| 132 | echo " $result" |
Roger Meier | 4edac7f | 2014-05-02 21:07:01 +0200 | [diff] [blame] | 133 | # add details to the error.log |
| 134 | print_header >> log/error.log |
| 135 | printf "%-16s %-11s %-17s\n" ${client_server} ${protocol} ${transport} >> log/error.log |
| 136 | echo "=================== server message ===================" >> log/error.log |
| 137 | tail log/${testname}_server.log >> log/error.log |
| 138 | echo "=================== client message ===================" >> log/error.log |
| 139 | tail log/${testname}_client.log >> log/error.log |
| 140 | echo "======================================================" >> log/error.log |
| 141 | echo "" >> log/error.log |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 142 | fi |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 143 | |
henrique | ad4df16 | 2014-05-20 13:18:45 +0200 | [diff] [blame] | 144 | # split client-server string |
| 145 | client=${client_server%-*} |
| 146 | server=${client_server#*-} |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 147 | |
| 148 | cat << EOF >> $STATUS_HTML |
| 149 | [ |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 150 | "${server}", |
Roger Meier | c62798b | 2014-05-23 12:54:08 +0200 | [diff] [blame] | 151 | "${client}", |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 152 | "${protocol}", |
| 153 | "${transport}", |
| 154 | "${result} (<a href=\"log/${testname}_client.log\">client</a>, <a href=\"log/${testname}_server.log\">server</a>)" |
| 155 | ], |
| 156 | EOF |
| 157 | |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 158 | # silently kill server |
| 159 | kill ${server_pid} 2>/dev/null && wait ${server_pid} 2>/dev/null |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 160 | } |
| 161 | |
| 162 | echo "Apache Thrift - integration test suite" |
| 163 | date |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 164 | |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 165 | |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 166 | echo "======================================================" |
| 167 | |
| 168 | rm -rf log |
| 169 | mkdir -p log |
| 170 | |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 171 | |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 172 | print_header |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 173 | print_html_header |
| 174 | |
| 175 | ant -f ../lib/java/build.xml compile-test 1>/dev/null |
| 176 | |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 177 | |
Roger Meier | 8252577 | 2012-11-16 00:38:27 +0000 | [diff] [blame] | 178 | #TODO add enum for parameters |
| 179 | #TODO align program arguments across languages |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 180 | |
Roger Meier | 023192f | 2014-02-12 09:35:12 +0100 | [diff] [blame] | 181 | cpp_protocols="binary compact json" |
| 182 | java_protocols="binary compact json" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 183 | cpp_transports="buffered framed http" |
| 184 | java_server_transports="buffered framed fastframed" |
| 185 | java_client_transports=${java_server_transports}" http" |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 186 | # we need a test certificate first |
Roger Meier | 5829a2c | 2014-04-08 00:28:17 +0200 | [diff] [blame] | 187 | cpp_sockets="ip domain ip-ssl" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 188 | java_sockets="ip ip-ssl" |
| 189 | # TODO fastframed java transport is another implementation of framed transport |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 190 | |
Roger Meier | d9b331d | 2014-05-25 22:59:17 +0200 | [diff] [blame] | 191 | nodejs_protocols="binary compact json" |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 192 | nodejs_transports="buffered framed" |
Roger Meier | 57b354b | 2014-02-22 01:01:58 +0100 | [diff] [blame] | 193 | nodejs_sockets="ip ip-ssl" |
Roger Meier | eaa61d8 | 2012-01-12 21:38:29 +0000 | [diff] [blame] | 194 | |
Jens Geyer | c1d7943 | 2014-04-22 22:52:43 +0200 | [diff] [blame] | 195 | csharp_protocols="binary compact json" |
| 196 | csharp_transports="buffered framed" |
| 197 | csharp_sockets="ip ip-ssl" |
| 198 | |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 199 | |
| 200 | ######### java client - java server ############# |
| 201 | for proto in $java_protocols; do |
| 202 | for trans in $java_server_transports; do |
| 203 | for sock in $java_sockets; do |
| 204 | case "$sock" in |
| 205 | "ip" ) extraparam="";; |
| 206 | "ip-ssl" ) extraparam="--ssl";; |
| 207 | esac |
| 208 | do_test "java-java" "${proto}" "${trans}-${sock}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 209 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \ |
| 210 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \ |
| 211 | "5" "1" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 212 | done |
| 213 | done |
| 214 | done |
| 215 | |
| 216 | ######### cpp client - cpp server ############### |
| 217 | for proto in $cpp_protocols; do |
| 218 | for trans in $cpp_transports; do |
| 219 | for sock in $cpp_sockets; do |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 220 | case "$sock" in |
| 221 | "ip" ) extraparam="";; |
| 222 | "ip-ssl" ) extraparam="--ssl";; |
| 223 | "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";; |
| 224 | esac |
| 225 | do_test "cpp-cpp" "${proto}" "${trans}-${sock}" \ |
| 226 | "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \ |
| 227 | "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 228 | "2" "0.1" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 229 | done |
| 230 | done |
| 231 | done |
| 232 | |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 233 | |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 234 | ######### java client - cpp server ############## |
| 235 | # warning: ssl over http is not supported in java client! |
| 236 | for proto in $(intersection "${java_protocols}" "${cpp_protocols}"); do |
| 237 | for trans in $(intersection "${java_client_transports}" "${cpp_transports}"); do |
| 238 | for sock in $(intersection "${java_sockets}" "${cpp_sockets}"); do |
| 239 | case "$sock" in |
| 240 | "ip" ) extraparam="";; |
| 241 | "ip-ssl" ) extraparam="--ssl";; |
| 242 | esac |
Roger Meier | 188024e | 2014-04-17 21:53:45 +0200 | [diff] [blame] | 243 | do_test "java-cpp" "${proto}" "${trans}-${sock}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 244 | "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] | 245 | "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}"\ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 246 | "5" "0.1" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 247 | done |
| 248 | done |
| 249 | done |
| 250 | |
| 251 | ######### cpp client - java server ############## |
| 252 | for proto in $(intersection "${cpp_protocols}" "${java_protocols}"); do |
| 253 | for trans in $(intersection "${cpp_transports}" "${java_server_transports}"); do |
| 254 | for sock in $(intersection "${java_sockets}" "${cpp_sockets}"); do |
| 255 | case "$sock" in |
| 256 | "ip" ) extraparam="";; |
| 257 | "ip-ssl" ) extraparam="--ssl";; |
| 258 | esac |
Roger Meier | 188024e | 2014-04-17 21:53:45 +0200 | [diff] [blame] | 259 | do_test "cpp-java" "${proto}" "${trans}-${sock}" \ |
| 260 | "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 261 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \ |
| 262 | "5" "1" |
Roger Meier | f42ce2a | 2013-01-16 22:12:14 +0100 | [diff] [blame] | 263 | done |
| 264 | done |
| 265 | done |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 266 | |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 267 | |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 268 | NODE_TEST_DIR=${BASEDIR}/../lib/nodejs/test |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 269 | export NODE_PATH=${NODE_TEST_DIR}:${NODE_TEST_DIR}/../lib:${NODE_PATH} |
Roger Meier | d9b331d | 2014-05-25 22:59:17 +0200 | [diff] [blame] | 270 | ######### nodejs client - nodejs server ############## |
| 271 | ## |
| 272 | for proto in ${nodejs_protocols}; do |
| 273 | for trans in ${nodejs_transports}; do |
| 274 | for sock in ${nodejs_sockets}; do |
| 275 | case "$sock" in |
| 276 | "ip" ) extraparam="";; |
| 277 | "ip-ssl" ) extraparam="--ssl";; |
| 278 | esac |
| 279 | do_test "nodejs-nodejs" "${proto}" "${trans}-${sock}" \ |
| 280 | "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 281 | "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 282 | "5" "0.2" |
| 283 | done |
| 284 | done |
| 285 | done |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 286 | |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 287 | ######### nodejs client - cpp server ############## |
| 288 | ## |
| 289 | for proto in $(intersection "${nodejs_protocols}" "${cpp_protocols}"); do |
| 290 | for trans in $(intersection "${nodejs_transports}" "${cpp_transports}"); do |
| 291 | for sock in $(intersection "${nodejs_sockets}" "${cpp_sockets}"); do |
Roger Meier | 57b354b | 2014-02-22 01:01:58 +0100 | [diff] [blame] | 292 | case "$sock" in |
| 293 | "ip" ) extraparam="";; |
| 294 | "ip-ssl" ) extraparam="--ssl";; |
| 295 | esac |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 296 | do_test "nodejs-cpp" "${proto}" "${trans}-${sock}" \ |
| 297 | "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \ |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 298 | "cpp/TestServer --protocol=${proto} --transport=${trans} ${extraparam}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 299 | "5" "0.2" |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 300 | done |
| 301 | done |
| 302 | done |
| 303 | |
| 304 | ######### cpp client - nodejs server ############## |
| 305 | for proto in $(intersection "${nodejs_protocols}" "${cpp_protocols}"); do |
| 306 | for trans in $(intersection "${nodejs_transports}" "${cpp_transports}"); do |
| 307 | for sock in $(intersection "${nodejs_sockets}" "${cpp_sockets}"); do |
Roger Meier | 57b354b | 2014-02-22 01:01:58 +0100 | [diff] [blame] | 308 | case "$sock" in |
| 309 | "ip" ) extraparam="";; |
| 310 | "ip-ssl" ) extraparam="--ssl";; |
| 311 | esac |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 312 | do_test "cpp-nodejs" "${proto}" "${trans}-${sock}" \ |
Roger Meier | 57b354b | 2014-02-22 01:01:58 +0100 | [diff] [blame] | 313 | "cpp/TestClient --protocol=${proto} --transport=${trans} ${extraparam}" \ |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 314 | "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 315 | "5" "2" |
Roger Meier | 8909cbd | 2014-01-26 11:44:27 +0100 | [diff] [blame] | 316 | done |
| 317 | done |
| 318 | done |
| 319 | |
Roger Meier | 5c6ad24 | 2014-05-27 21:18:00 +0200 | [diff] [blame^] | 320 | ######### nodejs client - java server ############## |
| 321 | ## |
| 322 | for proto in $(intersection "${nodejs_protocols}" "${java_protocols}"); do |
| 323 | for trans in $(intersection "${nodejs_transports}" "${java_server_transports}"); do |
| 324 | for sock in $(intersection "${nodejs_sockets}" "${java_sockets}"); do |
| 325 | case "$sock" in |
| 326 | "ip" ) extraparam="";; |
| 327 | "ip-ssl" ) extraparam="--ssl";; |
| 328 | esac |
| 329 | do_test "nodejs-java" "${proto}" "${trans}-${sock}" \ |
| 330 | "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 331 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testserver" \ |
| 332 | "5" "1" |
| 333 | done |
| 334 | done |
| 335 | done |
| 336 | |
| 337 | ######### java client - nodejs server ############## |
| 338 | for proto in $(intersection "${nodejs_protocols}" "${java_protocols}"); do |
| 339 | for trans in $(intersection "${nodejs_transports}" "${java_client_transports}"); do |
| 340 | for sock in $(intersection "${nodejs_sockets}" "${java_sockets}"); do |
| 341 | case "$sock" in |
| 342 | "ip" ) extraparam="";; |
| 343 | "ip-ssl" ) extraparam="--ssl";; |
| 344 | esac |
| 345 | do_test "java-nodejs" "${proto}" "${trans}-${sock}" \ |
| 346 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} ${extraparam}\" run-testclient" \ |
| 347 | "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} ${extraparam}" \ |
| 348 | "5" "2" |
| 349 | done |
| 350 | done |
| 351 | done |
| 352 | |
Roger Meier | 691ec00 | 2012-11-02 07:50:24 +0000 | [diff] [blame] | 353 | # delete Unix Domain Socket used by cpp tests |
| 354 | rm -f /tmp/ThriftTest.thrift |
| 355 | |
Jens Geyer | c1d7943 | 2014-04-22 22:52:43 +0200 | [diff] [blame] | 356 | ######### csharp client - csharp server ############# |
| 357 | export MONO_PATH=../lib/csharp |
| 358 | for proto in $csharp_protocols; do |
| 359 | for trans in $csharp_transports; do |
| 360 | for sock in $csharp_sockets; do |
| 361 | case "$sock" in |
| 362 | "ip" ) extraparam="";; |
| 363 | "ip-ssl" ) extraparam="--ssl";; |
| 364 | esac |
| 365 | do_test "csharp-csharp" "${proto}" "${trans}-${sock}" \ |
| 366 | "../lib/csharp/test/ThriftTest/TestClientServer.exe client --protocol=${proto} --transport=${trans} ${extraparam}" \ |
| 367 | "../lib/csharp/test/ThriftTest/TestClientServer.exe server --protocol=${proto} --transport=${trans} ${extraparam}" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 368 | "5" "1" |
Jens Geyer | c1d7943 | 2014-04-22 22:52:43 +0200 | [diff] [blame] | 369 | done |
| 370 | done |
| 371 | done |
| 372 | |
| 373 | |
Roger Meier | 85fb6de | 2012-11-02 00:05:42 +0000 | [diff] [blame] | 374 | do_test "py-py" "binary" "buffered-ip" \ |
| 375 | "py/TestClient.py --proto=binary --port=9090 --host=localhost --genpydir=py/gen-py" \ |
| 376 | "py/TestServer.py --proto=binary --port=9090 --genpydir=py/gen-py TSimpleServer" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 377 | "10" "2" |
Roger Meier | 85fb6de | 2012-11-02 00:05:42 +0000 | [diff] [blame] | 378 | do_test "py-py" "json" "buffered-ip" \ |
| 379 | "py/TestClient.py --proto=json --port=9090 --host=localhost --genpydir=py/gen-py" \ |
| 380 | "py/TestServer.py --proto=json --port=9090 --genpydir=py/gen-py TSimpleServer" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 381 | "10" "2" |
Roger Meier | 85fb6de | 2012-11-02 00:05:42 +0000 | [diff] [blame] | 382 | do_test "py-cpp" "binary" "buffered-ip" \ |
| 383 | "py/TestClient.py --proto=binary --port=9090 --host=localhost --genpydir=py/gen-py" \ |
| 384 | "cpp/TestServer" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 385 | "10" "2" |
Roger Meier | 85fb6de | 2012-11-02 00:05:42 +0000 | [diff] [blame] | 386 | do_test "py-cpp" "json" "buffered-ip" \ |
| 387 | "py/TestClient.py --proto=json --port=9090 --host=localhost --genpydir=py/gen-py" \ |
| 388 | "cpp/TestServer --protocol=json" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 389 | "10" "2" |
Roger Meier | 85fb6de | 2012-11-02 00:05:42 +0000 | [diff] [blame] | 390 | do_test "cpp-py" "binary" "buffered-ip" \ |
| 391 | "cpp/TestClient --protocol=binary --port=9090" \ |
| 392 | "py/TestServer.py --proto=binary --port=9090 --genpydir=py/gen-py TSimpleServer" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 393 | "10" "2" |
Roger Meier | 85fb6de | 2012-11-02 00:05:42 +0000 | [diff] [blame] | 394 | do_test "cpp-py" "json" "buffered-ip" \ |
| 395 | "cpp/TestClient --protocol=json --port=9090" \ |
| 396 | "py/TestServer.py --proto=json --port=9090 --genpydir=py/gen-py TSimpleServer" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 397 | "10" "2" |
Roger Meier | 85fb6de | 2012-11-02 00:05:42 +0000 | [diff] [blame] | 398 | do_test "py-java" "binary" "buffered-ip" \ |
| 399 | "py/TestClient.py --proto=binary --port=9090 --host=localhost --genpydir=py/gen-py" \ |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 400 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" run-testserver" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 401 | "15" "2" |
Roger Meier | 7a66f75 | 2014-03-10 12:35:41 +0100 | [diff] [blame] | 402 | do_test "py-java" "json" "buffered-ip" \ |
Roger Meier | 85fb6de | 2012-11-02 00:05:42 +0000 | [diff] [blame] | 403 | "py/TestClient.py --proto=json --port=9090 --host=localhost --genpydir=py/gen-py" \ |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 404 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=json\" run-testserver" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 405 | "15" "2" |
Roger Meier | 85fb6de | 2012-11-02 00:05:42 +0000 | [diff] [blame] | 406 | do_test "java-py" "binary" "buffered-ip" \ |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 407 | "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" run-testclient" \ |
Roger Meier | 85fb6de | 2012-11-02 00:05:42 +0000 | [diff] [blame] | 408 | "py/TestServer.py --proto=binary --port=9090 --genpydir=py/gen-py TSimpleServer" \ |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 409 | "10" "5" |
Roger Meier | 4edac7f | 2014-05-02 21:07:01 +0200 | [diff] [blame] | 410 | do_test "js-java" "json" "http-ip" \ |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 411 | "" \ |
| 412 | "ant -f ../lib/js/test/build.xml unittest" \ |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 413 | "2" "2" |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 414 | do_test "perl-cpp" "binary" "buffered-ip" \ |
Roger Meier | 01b568c | 2012-01-10 21:30:02 +0000 | [diff] [blame] | 415 | "perl -I perl/gen-perl/ -I../lib/perl/lib/ perl/TestClient.pl" \ |
Roger Meier | 4d5157d | 2012-01-09 21:23:19 +0000 | [diff] [blame] | 416 | "cpp/TestServer" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 417 | "10" "2" |
Roger Meier | b33967b | 2012-01-21 09:18:05 +0000 | [diff] [blame] | 418 | do_test "php-cpp" "binary" "buffered-ip" \ |
| 419 | "make -C php/ client" \ |
| 420 | "cpp/TestServer" \ |
henrique | d5aba4c | 2014-04-30 18:11:11 +0200 | [diff] [blame] | 421 | "10" "2" |
Roger Meier | c95d5df | 2014-01-19 21:53:02 +0100 | [diff] [blame] | 422 | do_test "rb-rb" "binary" "buffered-ip" \ |
| 423 | "ruby rb/integration/simple_client.rb" \ |
| 424 | "ruby rb/integration/simple_server.rb" \ |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 425 | "5" "5" |
Roger Meier | 9aa08a9 | 2014-01-20 18:41:48 +0100 | [diff] [blame] | 426 | do_test "rb-rb" "binary-accl" "buffered-ip" \ |
Roger Meier | c95d5df | 2014-01-19 21:53:02 +0100 | [diff] [blame] | 427 | "ruby rb/integration/accelerated_buffered_client.rb" \ |
| 428 | "ruby rb/integration/accelerated_buffered_server.rb" \ |
henrique | d17f1c9 | 2014-04-30 16:21:25 +0200 | [diff] [blame] | 429 | "5" "5" |
Roger Meier | 4edac7f | 2014-05-02 21:07:01 +0200 | [diff] [blame] | 430 | |
| 431 | echo " failed tests are logged to test/log/error.log" |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 432 | echo " full log is here test/log/client_server_protocol_transport_client.log" |
| 433 | echo " full log is here test/log/client_server_protocol_transport_server.log" |
| 434 | echo " or look at file://$BASEDIR/$STATUS_HTML" |
| 435 | |
henrique | ad4df16 | 2014-05-20 13:18:45 +0200 | [diff] [blame] | 436 | ELAPSED_TIME=$(echo "(${SECONDS} - ${START_TIME})" | bc) |
| 437 | DURATION="${ELAPSED_TIME} seconds" |
Roger Meier | cc0fe27 | 2014-05-16 23:18:25 +0200 | [diff] [blame] | 438 | echo "test an took" $DURATION |
| 439 | print_html_footer "$DURATION" |
| 440 | |
Roger Meier | 4edac7f | 2014-05-02 21:07:01 +0200 | [diff] [blame] | 441 | date |
Roger Meier | 8252577 | 2012-11-16 00:38:27 +0000 | [diff] [blame] | 442 | cd - |