github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/grpc/test/kokoro/xds.sh (about) 1 #!/bin/bash 2 3 set -exu -o pipefail 4 [[ -f /VERSION ]] && cat /VERSION 5 6 cd github 7 8 export GOPATH="${HOME}/gopath" 9 pushd grpc-go/interop/xds/client 10 branch=$(git branch --all --no-color --contains "${KOKORO_GITHUB_COMMIT}" \ 11 | grep -v HEAD | head -1) 12 shopt -s extglob 13 branch="${branch//[[:space:]]}" 14 branch="${branch##remotes/origin/}" 15 shopt -u extglob 16 # Install a version of Go supported by gRPC for the new features, e.g. 17 # errors.Is() 18 curl --retry 3 -O -L https://go.dev/dl/go1.17.3.linux-amd64.tar.gz 19 sudo tar -C /usr/local -xf go1.17.3.linux-amd64.tar.gz 20 sudo ln -s /usr/local/go/bin/go /usr/bin/go 21 # Retry go build on errors (e.g. go get connection errors), for at most 3 times 22 for i in 1 2 3; do go build && break || sleep 5; done 23 popd 24 25 git clone -b "${branch}" --single-branch --depth=1 https://github.com/grpc/grpc.git 26 27 grpc/tools/run_tests/helper_scripts/prep_xds.sh 28 29 # Test cases "path_matching" and "header_matching" are not included in "all", 30 # because not all interop clients in all languages support these new tests. 31 # 32 # TODO: remove "path_matching" and "header_matching" from --test_case after 33 # they are added into "all". 34 GRPC_GO_LOG_VERBOSITY_LEVEL=99 GRPC_GO_LOG_SEVERITY_LEVEL=info \ 35 python3 grpc/tools/run_tests/run_xds_tests.py \ 36 --test_case="all,circuit_breaking,timeout,fault_injection,csds" \ 37 --project_id=grpc-testing \ 38 --project_num=830293263384 \ 39 --source_image=projects/grpc-testing/global/images/xds-test-server-5 \ 40 --path_to_server_binary=/java_server/grpc-java/interop-testing/build/install/grpc-interop-testing/bin/xds-test-server \ 41 --gcp_suffix=$(date '+%s') \ 42 --verbose \ 43 ${XDS_V3_OPT-} \ 44 --client_cmd="grpc-go/interop/xds/client/client \ 45 --server=xds:///{server_uri} \ 46 --stats_port={stats_port} \ 47 --qps={qps} \ 48 {fail_on_failed_rpc} \ 49 {rpcs_to_send} \ 50 {metadata_to_send}" 51