diff options
author | yongni <yongni@google.com> | 2017-07-17 12:28:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-17 12:28:02 -0700 |
commit | 4708a21c8144f9fed3c90ea8fa153aa20302a1d7 (patch) | |
tree | 78dd61a4d9840f40df50234c02f0ecdda019f3e4 /tools | |
parent | afbd3be7d94b44281b7b1fb5425286cad425b605 (diff) | |
parent | a808af1561647dbacfa7613a182ee743b1e9477d (diff) |
Merge pull request #11847 from yongni/master
Added C++ to interop_matrix and created a kokoro config
Diffstat (limited to 'tools')
-rw-r--r-- | tools/internal_ci/linux/grpc_interop_matrix.cfg | 25 | ||||
-rwxr-xr-x | tools/internal_ci/linux/grpc_interop_matrix.sh | 25 | ||||
-rw-r--r-- | tools/interop_matrix/client_matrix.py | 3 | ||||
-rwxr-xr-x | tools/interop_matrix/run_interop_matrix_tests.py | 3 | ||||
-rwxr-xr-x | tools/interop_matrix/testcases/cxx__master | 11 |
5 files changed, 66 insertions, 1 deletions
diff --git a/tools/internal_ci/linux/grpc_interop_matrix.cfg b/tools/internal_ci/linux/grpc_interop_matrix.cfg new file mode 100644 index 0000000000..2fa3e8f897 --- /dev/null +++ b/tools/internal_ci/linux/grpc_interop_matrix.cfg @@ -0,0 +1,25 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Config file for the internal CI (in protobuf text format) + +# Location of the continuous shell script in repository. +build_file: "grpc/tools/internal_ci/linux/grpc_interop_matrix.sh" +# grpc_interop tests can take 1 hours to complete. +timeout_mins: 60 +action { + define_artifacts { + regex: "**/sponge_log.xml" + } +} diff --git a/tools/internal_ci/linux/grpc_interop_matrix.sh b/tools/internal_ci/linux/grpc_interop_matrix.sh new file mode 100755 index 0000000000..e199d48931 --- /dev/null +++ b/tools/internal_ci/linux/grpc_interop_matrix.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -ex + +export LANG=en_US.UTF-8 + +# Enter the gRPC repo root +cd $(dirname $0)/../../.. + +source tools/internal_ci/helper_scripts/prepare_build_linux_rc + +tools/interop_matrix/run_interop_matrix_tests.py --language=all --release=all --report_file=sponge_log.xml $@ diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py index 34becf9bb7..4394e32c08 100644 --- a/tools/interop_matrix/client_matrix.py +++ b/tools/interop_matrix/client_matrix.py @@ -19,10 +19,12 @@ def get_github_repo(lang): return { 'go': 'git@github.com:grpc/grpc-go.git', 'java': 'git@github.com:grpc/grpc-java.git', + # all other languages use the grpc.git repo. }.get(lang, 'git@github.com:grpc/grpc.git') # Dictionary of runtimes per language LANG_RUNTIME_MATRIX = { + 'cxx': ['cxx'], # This is actually debian8. 'go': ['go1.7', 'go1.8'], 'java': ['java_oracle8'], } @@ -30,6 +32,7 @@ LANG_RUNTIME_MATRIX = { # Dictionary of releases per language. For each language, we need to provide # a tuple of release tag (used as the tag for the GCR image) and also github hash. LANG_RELEASE_MATRIX = { + 'cxx': ['v1.0.1', 'v1.1.2'], 'go': ['v1.0.1-GA', 'v1.3.0'], 'java': ['v1.0.3', 'v1.1.2'], } diff --git a/tools/interop_matrix/run_interop_matrix_tests.py b/tools/interop_matrix/run_interop_matrix_tests.py index b1b95ed679..28126ddf5c 100755 --- a/tools/interop_matrix/run_interop_matrix_tests.py +++ b/tools/interop_matrix/run_interop_matrix_tests.py @@ -125,7 +125,6 @@ def find_test_cases(lang, release): # Only line start with 'docker run' are test cases. for line in f.readlines(): if line.startswith('docker run'): - line = line.replace('docker run', 'gcloud docker -- run') m = re.search('--test_case=(.*)"', line) shortname = m.group(1) if m else 'unknown_test' spec = jobset.JobSpec(cmdline=line, @@ -152,6 +151,8 @@ def run_tests_for_lang(lang, runtime, images): for image_tuple in images: release, image = image_tuple jobset.message('START', 'Testing %s' % image, do_newline=True) + # Download the docker image before running each test case. + subprocess.check_call(['gcloud', 'docker', '--', 'pull', image]) _docker_images_cleanup.append(image) job_spec_list = find_test_cases(lang,release) num_failures, resultset = jobset.run(job_spec_list, diff --git a/tools/interop_matrix/testcases/cxx__master b/tools/interop_matrix/testcases/cxx__master new file mode 100755 index 0000000000..ccd2859530 --- /dev/null +++ b/tools/interop_matrix/testcases/cxx__master @@ -0,0 +1,11 @@ +#!/bin/bash +echo "Testing ${docker_image:=grpc_interop_cxx:1423f288-ac00-4f3a-9885-771258eecae3}" +docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=large_unary" +docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_unary" +docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=ping_pong" +docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=empty_stream" +docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=client_streaming" +docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=server_streaming" +docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_begin" +docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=cancel_after_first_response" +docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "bins/opt/interop_client --server_host=216.239.32.254 --server_host_override=grpc-test.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server" |