This directory contains scripts that facilitate building and running gRPC tests for combinations of language/runtimes (known as matrix).
The setup builds gRPC docker images for each language/runtime and upload it to Google Container Registry (GCR). These images, encapsulating gRPC stack from specific releases/tag, are used to test version compatiblity between gRPC release versions.
We have continuous nightly test setup to test gRPC backward compatibility between old clients and latest server. When a gRPC developer creates a new gRPC release, s/he is also responsible to add the just-released gRPC client to the nightly test. The steps are:
./client_matrix.pyfile to reference the github tag for the release.
tools/interop_matrix/create_matrix_images.py --git_checkout --release=v1.9.9 --upload_images --language cxx csharp python ruby php
gcloud beta container images list --repository gcr.io/grpc-testingshows image repos.
gcloud beta container images list-tags gcr.io/grpc-testing/grpc_interop_java_oracle8should show an image entry with tag
gcloud docker -- pull gcr.io/grpc-testing/grpc_interop_java_oracle8:v1.9.9followed by
/export/hda3/tmp/grpc_matrix/. For more details on each step, refer to sections below.
build_interop.sh.templatefor the language/runtime under
tools/buildgen/generate_projects.shto create corresponding files under
client_matrix.pyfollowing existing language/runtimes examples.
tools/interop_matrix/create_matrix_images.pywhich 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.
LANG=<lang> [RELEASE=<release>] ./create_testcases.sh. For example,
LANG=go ./create_testcases.shwill generate
./testcases/go__master, which is also a functional bash script.
LANG=go KEEP_IMAGE=1 ./create_testcases.shwill generate
./testcases/go__masterand keep the local docker image so it can be invoked simply via
./testcases/go__master. Note: remove local docker images manually afterwards with
docker rmi <image_id>.
tools/interop_matrix/run_interop_matrix_tests.py. Useful options:
--releasespecifies a git release tag. Defaults to
--release=all. Make sure the GCR images with the tag have been created using
--languagespecifies a language. Defaults to
--language=all. For example, To test all languages for all gRPC releases across all runtimes, do
gcloud docker -- pull gcr.io/grpc-testing/grpc_interop_go1.7:master.
docker_imagevariable inline with the test case script created above. For example:
docker_image=gcr.io/grpc-testing/grpc_interop_go1.7:master ./testcases/go__masterwill run go__master test cases against
go1.7with gRPC release
masterdocker image in GCR.
template/are relative to the grpc repo root dir. File path starting with
./are relative to current directory (