pull/13166/head
Adele Zhou 7 years ago
parent 68100093eb
commit 1487c9fa52
  1. 2
      tools/interop_matrix/README.md
  2. 29
      tools/interop_matrix/client_matrix.py
  3. 12
      tools/interop_matrix/create_matrix_images.py
  4. 17
      tools/interop_matrix/create_testcases.sh
  5. 20
      tools/interop_matrix/testcases/ruby__master

@ -24,7 +24,7 @@ For more details on each step, refer to sections below.
- Create new `Dockerfile.template`, `build_interop.sh.template` for the language/runtime under `template/tools/dockerfile/`. - Create new `Dockerfile.template`, `build_interop.sh.template` for the language/runtime under `template/tools/dockerfile/`.
- Run `tools/buildgen/generate_projects.sh` to create corresponding files under `tools/dockerfile/`. - Run `tools/buildgen/generate_projects.sh` to create corresponding files under `tools/dockerfile/`.
- Add language/runtimes to `client_matrix.py` following existing language/runtimes examples. - Add language/runtimes to `client_matrix.py` following existing language/runtimes examples.
- Run `tools/interop_matrix/create_matrix_images.py` which will build and upload images to GCR. Unless you are also building images for a gRPC release, make sure not to set `--gcr_tag` (the default tag 'master' is used for testing). - Run `tools/interop_matrix/create_matrix_images.py` which will build and upload images to GCR. Unless you are also building images for a gRPC release, make sure not to set `--release` (the default release 'master' is used for testing).
*: Please delete your docker images at https://pantheon.corp.google.com/gcr/images/grpc-testing?project=grpc-testing afterwards. Permissions to access GrpcTesting project is required for this step. *: Please delete your docker images at https://pantheon.corp.google.com/gcr/images/grpc-testing?project=grpc-testing afterwards. Permissions to access GrpcTesting project is required for this step.

@ -27,6 +27,9 @@ LANG_RUNTIME_MATRIX = {
'cxx': ['cxx'], # This is actually debian8. 'cxx': ['cxx'], # This is actually debian8.
'go': ['go1.7', 'go1.8'], 'go': ['go1.7', 'go1.8'],
'java': ['java_oracle8'], 'java': ['java_oracle8'],
'python': ['python2.7', 'python3'],
'node': ['node8'],
'ruby': ['ruby'],
} }
# Dictionary of releases per language. For each language, we need to provide # Dictionary of releases per language. For each language, we need to provide
@ -59,4 +62,30 @@ LANG_RELEASE_MATRIX = {
'v1.6.1', 'v1.6.1',
'v1.7.0', 'v1.7.0',
], ],
'python': [
#'v1.0.1', #Fail to build. Investigating.
'v1.1.4',
'v1.2.5',
'v1.3.9',
'v1.4.2',
'v1.6.6',
],
# Fail to build
'node': [
# 'v1.0.1',
# 'v1.1.4',
# 'v1.2.5',
# 'v1.3.9',
# 'v1.4.2',
'v1.6.6',
],
'ruby': [
#'v1.0.1', Can't run the tests because with_rvm.sh is missing.
'v1.1.4',
'v1.2.5',
'v1.3.9',
'v1.4.2',
'v1.6.6',
],
} }

@ -177,6 +177,18 @@ def build_all_images_for_release(lang, release):
var ={'go': 'GRPC_GO_ROOT', 'java': 'GRPC_JAVA_ROOT', 'node': 'GRPC_NODE_ROOT'}.get(lang, 'GRPC_ROOT') var ={'go': 'GRPC_GO_ROOT', 'java': 'GRPC_JAVA_ROOT', 'node': 'GRPC_NODE_ROOT'}.get(lang, 'GRPC_ROOT')
env[var] = stack_base env[var] = stack_base
# Python and Node only have one docker template.
if 'python' in lang:
runtime = 'python'
job = build_image_jobspec(runtime, env, release)
docker_images.append(job.tag)
build_jobs.append(job)
elif 'node' in lang:
runtime = 'node'
job = build_image_jobspec(runtime, env, release)
docker_images.append(job.tag)
build_jobs.append(job)
else:
for runtime in client_matrix.LANG_RUNTIME_MATRIX[lang]: for runtime in client_matrix.LANG_RUNTIME_MATRIX[lang]:
job = build_image_jobspec(runtime, env, release) job = build_image_jobspec(runtime, env, release)
docker_images.append(job.tag) docker_images.append(job.tag)

@ -31,11 +31,16 @@ TESTCASES_DIR=${GRPC_ROOT}/tools/interop_matrix/testcases
echo "Create '$LANG' test cases for gRPC release '${RELEASE:=master}'" echo "Create '$LANG' test cases for gRPC release '${RELEASE:=master}'"
echo $client_lang
# Invoke run_interop_test in manual mode. # Invoke run_interop_test in manual mode.
# TODO(adelez): Add cloud_gateways when we figure out how to skip them if not # TODO(adelez): Add cloud_gateways when we figure out how to skip them if not
# running in GCE. # running in GCE.
${GRPC_ROOT}/tools/run_tests/run_interop_tests.py -l $LANG --use_docker \ if [ $LANG == "cxx" ]; then
client_lang="c++"
else
client_lang=$LANG
fi
echo $client_lang
${GRPC_ROOT}/tools/run_tests/run_interop_tests.py -l $client_lang --use_docker \
--cloud_to_prod --prod_servers default gateway_v4 --manual_run --cloud_to_prod --prod_servers default gateway_v4 --manual_run
# Clean up # Clean up
@ -59,14 +64,8 @@ trap cleanup EXIT
# Running the testcases as sanity unless we are asked to skip. # Running the testcases as sanity unless we are asked to skip.
[ -z "$SKIP_TEST" ] && (echo "Running test cases: $CMDS_SH"; sh $CMDS_SH) [ -z "$SKIP_TEST" ] && (echo "Running test cases: $CMDS_SH"; sh $CMDS_SH)
# Convert c++ to cxx.
if [$LANG == "c++" ]; then
client_lang="cxx"
else
client_lang=$LANG
fi
mkdir -p $TESTCASES_DIR mkdir -p $TESTCASES_DIR
testcase=$TESTCASES_DIR/${client_lang}__$RELEASE testcase=$TESTCASES_DIR/${LANG}__$RELEASE
if [ -e $testcase ]; then if [ -e $testcase ]; then
echo "Updating: $testcase" echo "Updating: $testcase"
diff $testcase $CMDS_SH || true diff $testcase $CMDS_SH || true

@ -0,0 +1,20 @@
#!/bin/bash
echo "Testing ${docker_image:=grpc_interop_ruby:6bd1f0eb-51a4-4ad8-861c-1cbd7a929f33}"
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --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"
docker run -i --rm=true -w /var/local/git/grpc --net=host $docker_image bash -c "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.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 "tools/run_tests/interop/with_rvm.sh ruby src/ruby/pb/test/client.rb --server_host=216.239.32.254 --server_host_override=grpc-test4.sandbox.googleapis.com --server_port=443 --use_tls=true --test_case=timeout_on_sleeping_server"
Loading…
Cancel
Save