diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py index 34becf9bb7d23111fbf70275637b7382a3ec0049..4394e32c0857cb7acb0bee022cbc57c11fc804d6 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 b1b95ed679fa980afd7f5e29c3117fd59201ab6f..28126ddf5cccdf466039ae4078412cf1d9f09231 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 0000000000000000000000000000000000000000..ccd2859530134fb66cdbc96aca6eb5cefb98e774 --- /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"