Donna Dionne | 0eaafca | 2015-01-26 16:38:10 -0800 | [diff] [blame] | 1 | #!/bin/bash |
Craig Tiller | 8342881 | 2015-02-16 12:13:57 -0800 | [diff] [blame^] | 2 | # 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 Dionne | 851f591 | 2015-02-02 15:06:42 -0800 | [diff] [blame] | 31 | thisfile=$(readlink -ne "${BASH_SOURCE[0]}") |
Donna Dionne | 4138a6a | 2015-02-04 20:09:40 -0800 | [diff] [blame] | 32 | current_time=$(date "+%Y-%m-%d-%H-%M-%S") |
| 33 | result_file_name=interop_result.$current_time.html |
| 34 | echo $result_file_name |
Donna Dionne | 0eaafca | 2015-01-26 16:38:10 -0800 | [diff] [blame] | 35 | |
| 36 | main() { |
| 37 | source grpc_docker.sh |
Donna Dionne | b39d91d | 2015-01-26 17:00:53 -0800 | [diff] [blame] | 38 | test_cases=(large_unary empty_unary ping_pong client_streaming server_streaming) |
murgatroid99 | 23ed7b1 | 2015-01-29 15:20:50 -0800 | [diff] [blame] | 39 | clients=(cxx java go ruby node) |
| 40 | servers=(cxx java go ruby node) |
Donna Dionne | 0eaafca | 2015-01-26 16:38:10 -0800 | [diff] [blame] | 41 | for test_case in "${test_cases[@]}" |
| 42 | do |
| 43 | for client in "${clients[@]}" |
| 44 | do |
| 45 | for server in "${servers[@]}" |
| 46 | do |
Donna Dionne | 4138a6a | 2015-02-04 20:09:40 -0800 | [diff] [blame] | 47 | 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 Dionne | 0eaafca | 2015-01-26 16:38:10 -0800 | [diff] [blame] | 53 | done |
| 54 | done |
| 55 | done |
Donna Dionne | 851f591 | 2015-02-02 15:06:42 -0800 | [diff] [blame] | 56 | if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then |
Donna Dionne | 4138a6a | 2015-02-04 20:09:40 -0800 | [diff] [blame] | 57 | cat pre.html /tmp/interop_result.txt post.html > /tmp/interop_result.html |
Donna Dionne | 851f591 | 2015-02-02 15:06:42 -0800 | [diff] [blame] | 58 | gsutil cp /tmp/interop_result.txt gs://stoked-keyword-656-output/interop_result.txt |
Donna Dionne | 4138a6a | 2015-02-04 20:09:40 -0800 | [diff] [blame] | 59 | 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 Dionne | 851f591 | 2015-02-02 15:06:42 -0800 | [diff] [blame] | 61 | rm /tmp/interop_result.txt |
Donna Dionne | 4138a6a | 2015-02-04 20:09:40 -0800 | [diff] [blame] | 62 | rm /tmp/interop_result.html |
Donna Dionne | 851f591 | 2015-02-02 15:06:42 -0800 | [diff] [blame] | 63 | fi |
Donna Dionne | 0eaafca | 2015-01-26 16:38:10 -0800 | [diff] [blame] | 64 | } |
| 65 | |
| 66 | set -x |
| 67 | main "$@" |