blob: 6ff3731985d4710dd1647d3e4beef591087baa87 [file] [log] [blame]
Donna Dionne0eaafca2015-01-26 16:38:10 -08001#!/bin/bash
Craig Tiller06059952015-02-18 08:34:56 -08002# Copyright 2015, Google Inc.
Craig Tiller83428812015-02-16 12:13:57 -08003# 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 Dionne030ca382015-05-06 15:09:58 -070035pass_log_link=https://pantheon.corp.google.com/m/cloudstorage/b/stoked-keyword-656-output/o/log/interop_pass_log_history
36fail_log_link=https://pantheon.corp.google.com/m/cloudstorage/b/stoked-keyword-656-output/o/log/interop_fail_log_history
Donna Dionne0eaafca2015-01-26 16:38:10 -080037
38main() {
39 source grpc_docker.sh
Donna Dionne9e87bb72015-03-06 12:02:04 -080040 test_cases=(large_unary empty_unary ping_pong client_streaming server_streaming cancel_after_begin cancel_after_first_response)
Donna Dionne1c96a8f2015-04-10 11:28:32 -070041 clients=(cxx java go ruby node python csharp_mono php)
Donna Dionne1ee2e4f2015-03-18 10:31:16 -070042 servers=(cxx java go ruby node python csharp_mono)
Donna Dionne0eaafca2015-01-26 16:38:10 -080043 for test_case in "${test_cases[@]}"
44 do
45 for client in "${clients[@]}"
46 do
47 for server in "${servers[@]}"
48 do
Donna Dionne81ce8dd2015-04-14 09:50:54 -070049 log_file_name=interop_{$test_case}_{$client}_{$server}.txt
50 if grpc_interop_test $test_case grpc-docker-testclients $client grpc-docker-server $server > /tmp/$log_file_name 2>&1
Donna Dionne4138a6a2015-02-04 20:09:40 -080051 then
Donna Dionne030ca382015-05-06 15:09:58 -070052 gsutil cp /tmp/$log_file_name gs://stoked-keyword-656-output/interop_pass_log_history/$log_file_name
53 echo " ['$test_case', '$client', '$server', true, '<a href="$pass_log_link/$log_file_name">log</a>']," >> /tmp/interop_result.txt
Donna Dionne4138a6a2015-02-04 20:09:40 -080054 else
Donna Dionne030ca382015-05-06 15:09:58 -070055 gsutil cp /tmp/$log_file_name gs://stoked-keyword-656-output/interop_fail_log_history/$log_file_name
56 echo " ['$test_case', '$client', '$server', false, '<a href="$fail_log_link/$log_file_name">log</a>']," >> /tmp/interop_result.txt
Donna Dionne4138a6a2015-02-04 20:09:40 -080057 fi
Donna Dionne0eaafca2015-01-26 16:38:10 -080058 done
59 done
60 done
Donna Dionne851f5912015-02-02 15:06:42 -080061 if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
Donna Dionne4138a6a2015-02-04 20:09:40 -080062 cat pre.html /tmp/interop_result.txt post.html > /tmp/interop_result.html
Donna Dionne851f5912015-02-02 15:06:42 -080063 gsutil cp /tmp/interop_result.txt gs://stoked-keyword-656-output/interop_result.txt
Donna Dionne030ca382015-05-06 15:09:58 -070064 gsutil cp -R gs://stoked-keyword-656-output/interop_pass_log_history gs://stoked-keyword-656-output/log
65 gsutil cp -R gs://stoked-keyword-656-output/interop_fail_log_history gs://stoked-keyword-656-output/log
Donna Dionne4138a6a2015-02-04 20:09:40 -080066 gsutil cp /tmp/interop_result.html gs://stoked-keyword-656-output/interop_result.html
67 gsutil cp /tmp/interop_result.html gs://stoked-keyword-656-output/result_history/$result_file_name
Donna Dionne851f5912015-02-02 15:06:42 -080068 rm /tmp/interop_result.txt
Donna Dionne4138a6a2015-02-04 20:09:40 -080069 rm /tmp/interop_result.html
Donna Dionne81ce8dd2015-04-14 09:50:54 -070070 rm /tmp/interop*.txt
Donna Dionne851f5912015-02-02 15:06:42 -080071 fi
Donna Dionne0eaafca2015-01-26 16:38:10 -080072}
73
74set -x
75main "$@"