Donna Dionne | 0eaafca | 2015-01-26 16:38:10 -0800 | [diff] [blame] | 1 | #!/bin/bash |
Craig Tiller | 0605995 | 2015-02-18 08:34:56 -0800 | [diff] [blame] | 2 | # Copyright 2015, Google Inc. |
Craig Tiller | 8342881 | 2015-02-16 12:13:57 -0800 | [diff] [blame] | 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 | 030ca38 | 2015-05-06 15:09:58 -0700 | [diff] [blame] | 35 | pass_log_link=https://pantheon.corp.google.com/m/cloudstorage/b/stoked-keyword-656-output/o/log/interop_pass_log_history |
| 36 | fail_log_link=https://pantheon.corp.google.com/m/cloudstorage/b/stoked-keyword-656-output/o/log/interop_fail_log_history |
Donna Dionne | 0eaafca | 2015-01-26 16:38:10 -0800 | [diff] [blame] | 37 | |
| 38 | main() { |
| 39 | source grpc_docker.sh |
Donna Dionne | 9e87bb7 | 2015-03-06 12:02:04 -0800 | [diff] [blame] | 40 | test_cases=(large_unary empty_unary ping_pong client_streaming server_streaming cancel_after_begin cancel_after_first_response) |
Donna Dionne | 1c96a8f | 2015-04-10 11:28:32 -0700 | [diff] [blame] | 41 | clients=(cxx java go ruby node python csharp_mono php) |
Donna Dionne | 1ee2e4f | 2015-03-18 10:31:16 -0700 | [diff] [blame] | 42 | servers=(cxx java go ruby node python csharp_mono) |
Donna Dionne | 0eaafca | 2015-01-26 16:38:10 -0800 | [diff] [blame] | 43 | for test_case in "${test_cases[@]}" |
| 44 | do |
| 45 | for client in "${clients[@]}" |
| 46 | do |
| 47 | for server in "${servers[@]}" |
| 48 | do |
Donna Dionne | 81ce8dd | 2015-04-14 09:50:54 -0700 | [diff] [blame] | 49 | 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 Dionne | 4138a6a | 2015-02-04 20:09:40 -0800 | [diff] [blame] | 51 | then |
Donna Dionne | 030ca38 | 2015-05-06 15:09:58 -0700 | [diff] [blame] | 52 | 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 Dionne | 4138a6a | 2015-02-04 20:09:40 -0800 | [diff] [blame] | 54 | else |
Donna Dionne | 030ca38 | 2015-05-06 15:09:58 -0700 | [diff] [blame] | 55 | 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 Dionne | 4138a6a | 2015-02-04 20:09:40 -0800 | [diff] [blame] | 57 | fi |
Donna Dionne | 0eaafca | 2015-01-26 16:38:10 -0800 | [diff] [blame] | 58 | done |
| 59 | done |
| 60 | done |
Donna Dionne | 851f591 | 2015-02-02 15:06:42 -0800 | [diff] [blame] | 61 | if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then |
Donna Dionne | 4138a6a | 2015-02-04 20:09:40 -0800 | [diff] [blame] | 62 | 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] | 63 | gsutil cp /tmp/interop_result.txt gs://stoked-keyword-656-output/interop_result.txt |
Donna Dionne | 030ca38 | 2015-05-06 15:09:58 -0700 | [diff] [blame] | 64 | 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 Dionne | 4138a6a | 2015-02-04 20:09:40 -0800 | [diff] [blame] | 66 | 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 Dionne | 851f591 | 2015-02-02 15:06:42 -0800 | [diff] [blame] | 68 | rm /tmp/interop_result.txt |
Donna Dionne | 4138a6a | 2015-02-04 20:09:40 -0800 | [diff] [blame] | 69 | rm /tmp/interop_result.html |
Donna Dionne | 81ce8dd | 2015-04-14 09:50:54 -0700 | [diff] [blame] | 70 | rm /tmp/interop*.txt |
Donna Dionne | 851f591 | 2015-02-02 15:06:42 -0800 | [diff] [blame] | 71 | fi |
Donna Dionne | 0eaafca | 2015-01-26 16:38:10 -0800 | [diff] [blame] | 72 | } |
| 73 | |
| 74 | set -x |
| 75 | main "$@" |