blob: acdb2e9d2225a931df768b9e3d8496cacfd56575 [file] [log] [blame]
Donna Dionne0eaafca2015-01-26 16:38:10 -08001#!/bin/bash
Craig Tiller83428812015-02-16 12:13:57 -08002# Copyright 2014, Google Inc.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met:
8#
9# * Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer.
11# * Redistributions in binary form must reproduce the above
12# copyright notice, this list of conditions and the following disclaimer
13# in the documentation and/or other materials provided with the
14# distribution.
15# * Neither the name of Google Inc. nor the names of its
16# contributors may be used to endorse or promote products derived from
17# this software without specific prior written permission.
18#
19# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
Donna Dionne851f5912015-02-02 15:06:42 -080031thisfile=$(readlink -ne "${BASH_SOURCE[0]}")
Donna Dionne4138a6a2015-02-04 20:09:40 -080032current_time=$(date "+%Y-%m-%d-%H-%M-%S")
33result_file_name=interop_result.$current_time.html
34echo $result_file_name
Donna Dionne0eaafca2015-01-26 16:38:10 -080035
36main() {
37 source grpc_docker.sh
Donna Dionneb39d91d2015-01-26 17:00:53 -080038 test_cases=(large_unary empty_unary ping_pong client_streaming server_streaming)
murgatroid9923ed7b12015-01-29 15:20:50 -080039 clients=(cxx java go ruby node)
40 servers=(cxx java go ruby node)
Donna Dionne0eaafca2015-01-26 16:38:10 -080041 for test_case in "${test_cases[@]}"
42 do
43 for client in "${clients[@]}"
44 do
45 for server in "${servers[@]}"
46 do
Donna Dionne4138a6a2015-02-04 20:09:40 -080047 if grpc_interop_test $test_case grpc-docker-testclients $client grpc-docker-server $server
48 then
49 echo " ['$test_case', '$client', '$server', true]," >> /tmp/interop_result.txt
50 else
51 echo " ['$test_case', '$client', '$server', false]," >> /tmp/interop_result.txt
52 fi
Donna Dionne0eaafca2015-01-26 16:38:10 -080053 done
54 done
55 done
Donna Dionne851f5912015-02-02 15:06:42 -080056 if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
Donna Dionne4138a6a2015-02-04 20:09:40 -080057 cat pre.html /tmp/interop_result.txt post.html > /tmp/interop_result.html
Donna Dionne851f5912015-02-02 15:06:42 -080058 gsutil cp /tmp/interop_result.txt gs://stoked-keyword-656-output/interop_result.txt
Donna Dionne4138a6a2015-02-04 20:09:40 -080059 gsutil cp /tmp/interop_result.html gs://stoked-keyword-656-output/interop_result.html
60 gsutil cp /tmp/interop_result.html gs://stoked-keyword-656-output/result_history/$result_file_name
Donna Dionne851f5912015-02-02 15:06:42 -080061 rm /tmp/interop_result.txt
Donna Dionne4138a6a2015-02-04 20:09:40 -080062 rm /tmp/interop_result.html
Donna Dionne851f5912015-02-02 15:06:42 -080063 fi
Donna Dionne0eaafca2015-01-26 16:38:10 -080064}
65
66set -x
67main "$@"