diff options
Diffstat (limited to 'tools')
21 files changed, 228 insertions, 165 deletions
diff --git a/tools/dockerfile/interoptest/grpc_interop_python/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_python/build_interop.sh index a8898f85fa..7917e1cd60 100755 --- a/tools/dockerfile/interoptest/grpc_interop_python/build_interop.sh +++ b/tools/dockerfile/interoptest/grpc_interop_python/build_interop.sh @@ -28,4 +28,5 @@ cp -r /var/local/jenkins/service_account $HOME || true cd /var/local/git/grpc -tools/run_tests/run_tests.py -l python -c opt --build_only +# interop tests only run using python2.7 currently (and python build is slow) +tools/run_tests/run_tests.py -l python --compiler python2.7 -c opt --build_only diff --git a/tools/dockerfile/test/python_pyenv_x64/Dockerfile b/tools/dockerfile/test/python_pyenv_x64/Dockerfile index 43854aa689..c23e67c904 100644 --- a/tools/dockerfile/test/python_pyenv_x64/Dockerfile +++ b/tools/dockerfile/test/python_pyenv_x64/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM debian:jessie +FROM debian:stretch # Install Git and basic packages. RUN apt-get update && apt-get install -y \ @@ -80,7 +80,7 @@ RUN apt-get update && apt-get install -y \ mercurial \ zlib1g-dev && apt-get clean -# Install Pyenv and dev Python versions 3.5 and 3.6 +# Install Pyenv and dev Python versions 3.{5,6,7} RUN curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash ENV PATH /root/.pyenv/bin:$PATH RUN eval "$(pyenv init -)" @@ -88,12 +88,13 @@ RUN eval "$(pyenv virtualenv-init -)" RUN pyenv update RUN pyenv install 3.5-dev RUN pyenv install 3.6-dev +RUN pyenv install 3.7-dev RUN pyenv install pypy-5.3.1 -RUN pyenv local 3.5-dev 3.6-dev pypy-5.3.1 +RUN pyenv local 3.5-dev 3.6-dev 3.7-dev pypy-5.3.1 -# Install pip and virtualenv for Python 3.4 -RUN curl https://bootstrap.pypa.io/get-pip.py | python3.4 -RUN python3.4 -m pip install virtualenv +# Install pip and virtualenv for Python 3.5 +RUN curl https://bootstrap.pypa.io/get-pip.py | python3.5 +RUN python3.5 -m pip install virtualenv RUN mkdir /var/local/jenkins diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index d2b77691d4..2f12471a85 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -34,7 +34,8 @@ sudo systemsetup -setusingnetworktime on date # Add GCP credentials for BQ access -pip install google-api-python-client --user python +# pin google-api-python-client to avoid https://github.com/grpc/grpc/issues/15600 +pip install google-api-python-client==1.6.7 --user python export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json # If this is a PR using RUN_TESTS_FLAGS var, then add flags to filter tests diff --git a/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh b/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh index 7881e3a7fb..d2dded051d 100755 --- a/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh +++ b/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh @@ -22,8 +22,8 @@ mkdir -p ${KOKORO_KEYSTORE_DIR} cp ${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json ${KOKORO_KEYSTORE_DIR}/4321_grpc-testing-service temp_dir=$(mktemp -d) -ln -f "${KOKORO_GFILE_DIR}/bazel-release-0.12.0" ${temp_dir}/bazel -chmod 755 "${KOKORO_GFILE_DIR}/bazel-release-0.12.0" +ln -f "${KOKORO_GFILE_DIR}/bazel-rc-0.14.0rc5" ${temp_dir}/bazel +chmod 755 "${KOKORO_GFILE_DIR}/bazel-rc-0.14.0rc5" export PATH="${temp_dir}:${PATH}" # This should show ${temp_dir}/bazel which bazel @@ -49,9 +49,12 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc --strategy=Closure=remote \ --genrule_strategy=remote \ --experimental_strict_action_env=true \ - --experimental_remote_platform_override='properties:{name:"container-image" value:"docker://gcr.io/cloud-marketplace/google/rbe-debian8@sha256:1ede2a929b44d629ec5abe86eee6d7ffea1d5a4d247489a8867d46cfde3e38bd" }' \ - --crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/debian8_clang/0.3.0/bazel_0.10.0:toolchain \ + --experimental_remote_platform_override='properties:{name:"container-image" value:"docker://gcr.io/cloud-marketplace/google/rbe-ubuntu16-04@sha256:59bf0e191a6b5cc1ab62c2224c810681d1326bad5a27b1d36c9f40113e79da7f" }' \ + --crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/ubuntu16_04_clang/1.0/bazel_0.13.0/default:toolchain \ --define GRPC_PORT_ISOLATED_RUNTIME=1 \ + --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 \ + --extra_toolchains=@com_github_bazelbuild_bazeltoolchains//configs/ubuntu16_04_clang/1.0/bazel_0.13.0/cpp:cc-toolchain-clang-x86_64-default \ + --extra_execution_platforms=@com_github_bazelbuild_bazeltoolchains//configs/ubuntu16_04_clang/1.0:rbe_ubuntu1604 \ $1 \ -- //test/... || FAILED="true" diff --git a/tools/internal_ci/linux/grpc_msan_on_foundry.sh b/tools/internal_ci/linux/grpc_msan_on_foundry.sh index 5e644793ad..e8ef249aa5 100644 --- a/tools/internal_ci/linux/grpc_msan_on_foundry.sh +++ b/tools/internal_ci/linux/grpc_msan_on_foundry.sh @@ -23,8 +23,8 @@ mkdir -p ${KOKORO_KEYSTORE_DIR} cp ${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json ${KOKORO_KEYSTORE_DIR}/4321_grpc-testing-service temp_dir=$(mktemp -d) -ln -f "${KOKORO_GFILE_DIR}/bazel-release-0.12.0" ${temp_dir}/bazel -chmod 755 "${KOKORO_GFILE_DIR}/bazel-release-0.12.0" +ln -f "${KOKORO_GFILE_DIR}/bazel-rc-0.14.0rc5" ${temp_dir}/bazel +chmod 755 "${KOKORO_GFILE_DIR}/bazel-rc-0.14.0rc5" export PATH="${temp_dir}:${PATH}" # This should show ${temp_dir}/bazel which bazel @@ -50,7 +50,7 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc --strategy=Closure=remote \ --genrule_strategy=remote \ --experimental_strict_action_env=true \ - --experimental_remote_platform_override='properties:{name:"container-image" value:"docker://gcr.io/asci-toolchain/nosla-debian8-clang-msan@sha256:8f381d55c0456fb65821c90ada902c2584977e03a1eaca8fba8ce77e644c775b" }' \ + --experimental_remote_platform_override='properties:{name:"container-image" value:"docker://gcr.io/cloud-marketplace/google/rbe-ubuntu16-04@sha256:59bf0e191a6b5cc1ab62c2224c810681d1326bad5a27b1d36c9f40113e79da7f" }' \ --define GRPC_PORT_ISOLATED_RUNTIME=1 \ --copt=-gmlt \ --strip=never \ @@ -59,8 +59,11 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc --linkopt=-fsanitize=memory \ --copt=-fsanitize-memory-track-origins \ --action_env=LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH \ - --host_crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/debian8_clang/0.3.0/bazel_0.10.0:toolchain \ - --crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/experimental/debian8_clang/0.3.0/bazel_0.10.0/msan:msan_experimental_toolchain \ + --host_crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/ubuntu16_04_clang/1.0/bazel_0.13.0/default:toolchain \ + --crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/ubuntu16_04_clang/1.0/bazel_0.13.0/msan:toolchain \ + --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 \ + --extra_toolchains=@com_github_bazelbuild_bazeltoolchains//configs/ubuntu16_04_clang/1.0/bazel_0.13.0/cpp:cc-toolchain-clang-x86_64-default \ + --extra_execution_platforms=@com_github_bazelbuild_bazeltoolchains//configs/ubuntu16_04_clang/1.0:rbe_ubuntu1604 \ -- //test/... || FAILED="true" # Sleep to let ResultStore finish writing results before querying diff --git a/tools/internal_ci/linux/grpc_ubsan_on_foundry.sh b/tools/internal_ci/linux/grpc_ubsan_on_foundry.sh index 5c0e2df09d..f5c12c27a3 100644 --- a/tools/internal_ci/linux/grpc_ubsan_on_foundry.sh +++ b/tools/internal_ci/linux/grpc_ubsan_on_foundry.sh @@ -23,8 +23,8 @@ mkdir -p ${KOKORO_KEYSTORE_DIR} cp ${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json ${KOKORO_KEYSTORE_DIR}/4321_grpc-testing-service temp_dir=$(mktemp -d) -ln -f "${KOKORO_GFILE_DIR}/bazel-release-0.12.0" ${temp_dir}/bazel -chmod 755 "${KOKORO_GFILE_DIR}/bazel-release-0.12.0" +ln -f "${KOKORO_GFILE_DIR}/bazel-rc-0.14.0rc5" ${temp_dir}/bazel +chmod 755 "${KOKORO_GFILE_DIR}/bazel-rc-0.14.0rc5" export PATH="${temp_dir}:${PATH}" # This should show ${temp_dir}/bazel which bazel @@ -50,13 +50,16 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc --strategy=Closure=remote \ --genrule_strategy=remote \ --experimental_strict_action_env=true \ - --experimental_remote_platform_override='properties:{name:"container-image" value:"docker://gcr.io/cloud-marketplace/google/rbe-debian8@sha256:1ede2a929b44d629ec5abe86eee6d7ffea1d5a4d247489a8867d46cfde3e38bd" }' \ + --experimental_remote_platform_override='properties:{name:"container-image" value:"docker://gcr.io/cloud-marketplace/google/rbe-ubuntu16-04@sha256:59bf0e191a6b5cc1ab62c2224c810681d1326bad5a27b1d36c9f40113e79da7f" }' \ --define GRPC_PORT_ISOLATED_RUNTIME=1 \ --copt=-gmlt \ --strip=never \ --copt=-fsanitize=undefined \ --linkopt=-fsanitize=undefined \ - --crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/experimental/debian8_clang/0.3.0/bazel_0.12.0/ubsan:toolchain \ + --crosstool_top=@com_github_bazelbuild_bazeltoolchains//configs/experimental/ubuntu16_04_clang/1.0/bazel_0.13.0/ubsan:toolchain \ + --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 \ + --extra_toolchains=@com_github_bazelbuild_bazeltoolchains//configs/ubuntu16_04_clang/1.0/bazel_0.13.0/cpp:cc-toolchain-clang-x86_64-default \ + --extra_execution_platforms=@com_github_bazelbuild_bazeltoolchains//configs/ubuntu16_04_clang/1.0:rbe_ubuntu1604 \ -- //test/... || FAILED="true" # Sleep to let ResultStore finish writing results before querying diff --git a/tools/internal_ci/macos/grpc_build_artifacts.sh b/tools/internal_ci/macos/grpc_build_artifacts.sh index eb4568c32b..4dcc528d80 100755 --- a/tools/internal_ci/macos/grpc_build_artifacts.sh +++ b/tools/internal_ci/macos/grpc_build_artifacts.sh @@ -32,4 +32,11 @@ time bash tools/distrib/build_ruby_environment_macos.sh gem install rubygems-update update_rubygems -tools/run_tests/task_runner.py -f artifact macos +tools/run_tests/task_runner.py -f artifact macos || FAILED="true" + +tools/internal_ci/helper_scripts/delete_nonartifacts.sh || true + +if [ "$FAILED" != "" ] +then + exit 1 +fi diff --git a/tools/internal_ci/macos/grpc_distribtests.sh b/tools/internal_ci/macos/grpc_distribtests.sh index 59ea833eec..eb256d92ee 100644 --- a/tools/internal_ci/macos/grpc_distribtests.sh +++ b/tools/internal_ci/macos/grpc_distribtests.sh @@ -24,4 +24,11 @@ source tools/internal_ci/helper_scripts/prepare_build_macos_rc mv ${KOKORO_GFILE_DIR}/github/grpc/artifacts input_artifacts || true ls -R input_artifacts || true -tools/run_tests/task_runner.py -f distribtest macos +tools/run_tests/task_runner.py -f distribtest macos || FAILED="true" + +tools/internal_ci/helper_scripts/delete_nonartifacts.sh || true + +if [ "$FAILED" != "" ] +then + exit 1 +fi diff --git a/tools/internal_ci/macos/grpc_interop.sh b/tools/internal_ci/macos/grpc_interop.sh index b03401bd96..e290ed60c4 100755 --- a/tools/internal_ci/macos/grpc_interop.sh +++ b/tools/internal_ci/macos/grpc_interop.sh @@ -21,4 +21,11 @@ cd $(dirname $0)/../../.. source tools/internal_ci/helper_scripts/prepare_build_macos_interop_rc source tools/internal_ci/helper_scripts/prepare_build_macos_rc -tools/run_tests/run_interop_tests.py -l objc -s all --use_docker -t -j 1 +tools/run_tests/run_interop_tests.py -l objc -s all --use_docker -t -j 1 || FAILED="true" + +tools/internal_ci/helper_scripts/delete_nonartifacts.sh || true + +if [ "$FAILED" != "" ] +then + exit 1 +fi diff --git a/tools/internal_ci/macos/grpc_interop_toprod.sh b/tools/internal_ci/macos/grpc_interop_toprod.sh index 819a4721fd..5ddabb9bf9 100755 --- a/tools/internal_ci/macos/grpc_interop_toprod.sh +++ b/tools/internal_ci/macos/grpc_interop_toprod.sh @@ -32,4 +32,11 @@ export GRPC_DEFAULT_SSL_ROOTS_FILE_PATH="$(pwd)/etc/roots.pem" tools/run_tests/run_interop_tests.py -l c++ \ --cloud_to_prod --cloud_to_prod_auth --prod_servers default gateway_v4 \ --service_account_key_file="${KOKORO_GFILE_DIR}/GrpcTesting-726eb1347f15.json" \ - --skip_compute_engine_creds --internal_ci -t -j 4 + --skip_compute_engine_creds --internal_ci -t -j 4 || FAILED="true" + +tools/internal_ci/helper_scripts/delete_nonartifacts.sh || true + +if [ "$FAILED" != "" ] +then + exit 1 +fi diff --git a/tools/internal_ci/macos/grpc_run_tests_matrix.sh b/tools/internal_ci/macos/grpc_run_tests_matrix.sh index 9a43e4869b..7636a31f41 100755 --- a/tools/internal_ci/macos/grpc_run_tests_matrix.sh +++ b/tools/internal_ci/macos/grpc_run_tests_matrix.sh @@ -25,6 +25,8 @@ tools/run_tests/run_tests_matrix.py $RUN_TESTS_FLAGS || FAILED="true" # kill port_server.py to prevent the build from hanging ps aux | grep port_server\\.py | awk '{print $2}' | xargs kill -9 +tools/internal_ci/helper_scripts/delete_nonartifacts.sh || true + if [ "$FAILED" != "" ] then exit 1 diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py index 22e522bf6e..d6a704681a 100644 --- a/tools/interop_matrix/client_matrix.py +++ b/tools/interop_matrix/client_matrix.py @@ -326,7 +326,14 @@ LANG_RELEASE_MATRIX = { }, ], 'csharp': [ - #{'v1.0.1': None}, + { + 'v1.0.1': { + 'patch': [ + 'tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile', + 'tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile', + ] + } + }, { 'v1.1.4': None }, @@ -377,6 +384,7 @@ TESTCASES_VERSION_MATRIX = { 'node_v1.4.2': 'node__v1.1.4', 'node_v1.6.6': 'node__v1.1.4', 'ruby_v1.0.1': 'ruby__v1.0.1', + 'csharp_v1.0.1': 'csharp__v1.1.4', 'csharp_v1.1.4': 'csharp__v1.1.4', 'csharp_v1.2.5': 'csharp__v1.1.4', 'python_v1.0.x': 'python__v1.0.x', @@ -388,5 +396,5 @@ TESTCASES_VERSION_MATRIX = { 'python_v1.7.2': 'python__v1.0.x', 'python_v1.8.1': 'python__v1.0.x', 'python_v1.9.1': 'python__v1.0.x', - 'python_v1.10.0': 'python__v1.0.x', + 'python_v1.10.1': 'python__v1.0.x', } diff --git a/tools/interop_matrix/create_matrix_images.py b/tools/interop_matrix/create_matrix_images.py index ef9f6a5990..c2568efba0 100755 --- a/tools/interop_matrix/create_matrix_images.py +++ b/tools/interop_matrix/create_matrix_images.py @@ -97,6 +97,12 @@ argp.add_argument( 'reusing the repo can cause git checkout error if you switch ' 'between releases.') +argp.add_argument( + '--upload_images', + action='store_true', + help='If set, images will be uploaded to container registry after building.' +) + args = argp.parse_args() @@ -166,8 +172,10 @@ def build_all_images_for_lang(lang): """Build all docker images for a language across releases and runtimes.""" if not args.git_checkout: if args.release != 'master': - print('WARNING: --release is set but will be ignored\n') - releases = ['master'] + print( + 'Cannot use --release without also enabling --git_checkout.\n') + sys.exit(1) + releases = [args.release] else: if args.release == 'all': releases = client_matrix.get_release_tags(lang) @@ -268,6 +276,13 @@ def maybe_apply_patches_on_git_tag(stack_base, lang, release): sys.exit(1) subprocess.check_output( ['git', 'apply', patch_file], cwd=stack_base, stderr=subprocess.STDOUT) + + # TODO(jtattermusch): this really would need simplification and refactoring + # - "git add" and "git commit" can easily be done in a single command + # - it looks like the only reason for the existence of the "files_to_patch" + # entry is to perform "git add" - which is clumsy and fragile. + # - we only allow a single patch with name "git_repo.patch". A better design + # would be to allow multiple patches that can have more descriptive names. for repo_relative_path in files_to_patch: subprocess.check_output( ['git', 'add', repo_relative_path], @@ -334,8 +349,12 @@ languages = args.language if args.language != ['all'] else _LANGUAGES for lang in languages: docker_images = build_all_images_for_lang(lang) for image in docker_images: - jobset.message('START', 'Uploading %s' % image, do_newline=True) - # docker image name must be in the format <gcr_path>/<image>:<gcr_tag> - assert image.startswith(args.gcr_path) and image.find(':') != -1 - - subprocess.call(['gcloud', 'docker', '--', 'push', image]) + if args.upload_images: + jobset.message('START', 'Uploading %s' % image, do_newline=True) + # docker image name must be in the format <gcr_path>/<image>:<gcr_tag> + assert image.startswith(args.gcr_path) and image.find(':') != -1 + subprocess.call(['gcloud', 'docker', '--', 'push', image]) + else: + # Uploading (and overwriting images) by default can easily break things. + print('Not uploading image %s, run with --upload_images to upload.' + % image) diff --git a/tools/interop_matrix/patches/csharp_v1.0.1/git_repo.patch b/tools/interop_matrix/patches/csharp_v1.0.1/git_repo.patch new file mode 100644 index 0000000000..e07b9c80f8 --- /dev/null +++ b/tools/interop_matrix/patches/csharp_v1.0.1/git_repo.patch @@ -0,0 +1,81 @@ +diff --git a/third_party/boringssl b/third_party/boringssl +index c880e42ba1..70ef9596bb 160000 +--- a/third_party/boringssl ++++ b/third_party/boringssl +@@ -1 +1 @@ +-Subproject commit c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9 ++Subproject commit 70ef9596bbcc11353b9bb8d4e91478694dd21439 +diff --git a/third_party/gflags b/third_party/gflags +index 05b155ff59..30dbc81fb5 160000 +--- a/third_party/gflags ++++ b/third_party/gflags +@@ -1 +1 @@ +-Subproject commit 05b155ff59114735ec8cd089f669c4c3d8f59029 ++Subproject commit 30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e +diff --git a/third_party/googletest b/third_party/googletest +index c99458533a..ec44c6c167 160000 +--- a/third_party/googletest ++++ b/third_party/googletest +@@ -1 +1 @@ +-Subproject commit c99458533a9b4c743ed51537e25989ea55944908 ++Subproject commit ec44c6c1675c25b9827aacd08c02433cccde7780 +diff --git a/third_party/protobuf b/third_party/protobuf +index 1a58673508..b5fbb742af 160000 +--- a/third_party/protobuf ++++ b/third_party/protobuf +@@ -1 +1 @@ +-Subproject commit 1a586735085e817b1f52e53feec92ce418049f69 ++Subproject commit b5fbb742af122b565925987e65c08957739976a7 +diff --git a/third_party/zlib b/third_party/zlib +index 5089329162..cacf7f1d4e 160000 +--- a/third_party/zlib ++++ b/third_party/zlib +@@ -1 +1 @@ +-Subproject commit 50893291621658f355bc5b4d450a8d06a563053d ++Subproject commit cacf7f1d4e3d44d871b605da3b647f07d718623f +diff --git a/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile +index da1d2c645e..f405994293 100644 +--- a/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile ++++ b/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile +@@ -67,11 +67,10 @@ RUN apt-get update && apt-get install -y time && apt-get clean + # C# dependencies + + # Update to a newer version of mono +-RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +-RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list ++RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF ++RUN echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/4.6 main" | tee /etc/apt/sources.list.d/official.list + RUN echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list + RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list +-RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list + + # Install dependencies + RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y \ +diff --git a/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile +index 65f67d3650..26223753ed 100644 +--- a/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile ++++ b/tools/dockerfile/interoptest/grpc_interop_csharpcoreclr/Dockerfile +@@ -82,11 +82,10 @@ RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 + # C# dependencies + + # Update to a newer version of mono +-RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +-RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list ++RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF ++RUN echo "deb http://download.mono-project.com/repo/debian jessie main" | tee /etc/apt/sources.list.d/mono-official.list + RUN echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list + RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list +-RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list + + # Install dependencies + RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y \ +@@ -99,7 +98,8 @@ RUN nuget update -self + + # Install dotnet SDK based on https://www.microsoft.com/net/core#debian + RUN apt-get update && apt-get install -y curl libunwind8 gettext +-RUN curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=809130 ++# https://github.com/dotnet/core/blob/master/release-notes/download-archives/1.0.1-preview2-download.md ++RUN curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=827530 + RUN mkdir -p /opt/dotnet && tar zxf dotnet.tar.gz -C /opt/dotnet + RUN ln -s /opt/dotnet/dotnet /usr/local/bin + diff --git a/tools/interop_matrix/run_interop_matrix_tests.py b/tools/interop_matrix/run_interop_matrix_tests.py index eb8b7d6944..9d442346a7 100755 --- a/tools/interop_matrix/run_interop_matrix_tests.py +++ b/tools/interop_matrix/run_interop_matrix_tests.py @@ -116,6 +116,10 @@ def find_all_images_for_lang(lang): return {} releases = [args.release] + # TODO(jtattermusch): why do we need to query the existing images/tags? + # From LANG_RUNTIME_MATRIX and LANG_RELEASE_MATRIX it should be obvious + # which tags we want to test - and it should be an error if they are + # missing. # Images tuples keyed by runtime. images = {} for runtime in client_matrix.LANG_RUNTIME_MATRIX[lang]: diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 2a4bce564f..ae7c65dc45 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -9767,6 +9767,32 @@ { "deps": [ "gpr", + "gpr_base_headers", + "grpc_base_headers" + ], + "headers": [ + "src/core/lib/iomgr/cfstream_handle.h", + "src/core/lib/iomgr/endpoint_cfstream.h", + "src/core/lib/iomgr/error_cfstream.h" + ], + "is_filegroup": true, + "language": "c", + "name": "grpc_cfstream", + "src": [ + "src/core/lib/iomgr/cfstream_handle.cc", + "src/core/lib/iomgr/cfstream_handle.h", + "src/core/lib/iomgr/endpoint_cfstream.cc", + "src/core/lib/iomgr/endpoint_cfstream.h", + "src/core/lib/iomgr/error_cfstream.cc", + "src/core/lib/iomgr/error_cfstream.h", + "src/core/lib/iomgr/tcp_client_cfstream.cc" + ], + "third_party": false, + "type": "filegroup" + }, + { + "deps": [ + "gpr", "grpc_base" ], "headers": [ diff --git a/tools/run_tests/python_utils/upload_rbe_results.py b/tools/run_tests/python_utils/upload_rbe_results.py index 5955b3792f..a2dd0bc39d 100644 --- a/tools/run_tests/python_utils/upload_rbe_results.py +++ b/tools/run_tests/python_utils/upload_rbe_results.py @@ -175,8 +175,8 @@ if __name__ == "__main__": 'build_id': os.getenv('KOKORO_BUILD_NUMBER'), 'build_url': - 'https://sponge.corp.google.com/invocation?id=%s' % - os.getenv('KOKORO_BUILD_ID'), + 'https://source.cloud.google.com/results/invocations/%s' % + invocation_id, 'test_target': action['id']['targetId'], 'test_case': diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index ea4c7c3c65..67aa641e2d 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -1114,6 +1114,12 @@ class ObjCLanguage(object): 'SCHEME': 'SwiftSample', 'EXAMPLE_PATH': 'src/objective-c/examples/SwiftSample' }), + self.config.job_spec( + ['test/core/iomgr/ios/CFStreamTests/run_tests.sh'], + timeout_seconds=10 * 60, + shortname='cfstream-tests', + cpu_cost=1e6, + environ=_FORCE_ENVIRON_FOR_WRAPPERS), ] def pre_build_steps(self): @@ -1126,7 +1132,10 @@ class ObjCLanguage(object): return [] def build_steps(self): - return [['src/objective-c/tests/build_tests.sh']] + return [ + ['src/objective-c/tests/build_tests.sh'], + ['test/core/iomgr/ios/CFStreamTests/build_tests.sh'], + ] def post_tests_steps(self): return [] diff --git a/tools/run_tests/sanity/check_sources_and_headers.py b/tools/run_tests/sanity/check_sources_and_headers.py deleted file mode 100755 index 57ae5c5acc..0000000000 --- a/tools/run_tests/sanity/check_sources_and_headers.py +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env python -# Copyright 2015 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. - -from __future__ import print_function - -import json -import os -import re -import sys - -root = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../../..')) -with open( - os.path.join(root, 'tools', 'run_tests', 'generated', - 'sources_and_headers.json')) as f: - js = json.loads(f.read()) - -re_inc1 = re.compile(r'^#\s*include\s*"([^"]*)"') -assert re_inc1.match('#include "foo"').group(1) == 'foo' -re_inc2 = re.compile(r'^#\s*include\s*<((grpc|grpc\+\+)/[^"]*)>') -assert re_inc2.match('#include <grpc++/foo>').group(1) == 'grpc++/foo' - - -def get_target(name): - for target in js: - if target['name'] == name: - return target - assert False, 'no target %s' % name - - -def get_headers_transitive(): - """Computes set of headers transitively provided by each target""" - target_headers_transitive = {} - for target in js: - target_name = target['name'] - assert not target_headers_transitive.has_key(target_name) - target_headers_transitive[target_name] = set(target['headers']) - - # Make sure each target's transitive headers contain those - # of their dependencies. If not, add them and continue doing - # so until we get a full pass over all targets without any updates. - closure_changed = True - while closure_changed: - closure_changed = False - for target in js: - target_name = target['name'] - for dep in target['deps']: - headers = target_headers_transitive[target_name] - old_count = len(headers) - headers.update(target_headers_transitive[dep]) - if old_count != len(headers): - closure_changed = True - return target_headers_transitive - - -# precompute transitive closure of headers provided by each target -target_headers_transitive = get_headers_transitive() - - -def target_has_header(target, name): - if name in target_headers_transitive[target['name']]: - return True - if name.startswith('absl/'): - return True - if name in [ - 'src/core/lib/profiling/stap_probes.h', - 'src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h' - ]: - return True - return False - - -def produces_object(name): - return os.path.splitext(name)[1] in ['.c', '.cc'] - - -c_ish = {} -obj_producer_to_source = {'c': c_ish, 'c++': c_ish, 'csharp': {}} - -errors = 0 -for target in js: - if not target['third_party']: - for fn in target['src']: - with open(os.path.join(root, fn)) as f: - src = f.read().splitlines() - for line in src: - m = re_inc1.match(line) - if m: - if not target_has_header(target, m.group(1)): - print( - 'target %s (%s) does not name header %s as a dependency' - % (target['name'], fn, m.group(1))) - errors += 1 - m = re_inc2.match(line) - if m: - if not target_has_header(target, 'include/' + m.group(1)): - print( - 'target %s (%s) does not name header %s as a dependency' - % (target['name'], fn, m.group(1))) - errors += 1 - if target['type'] in ['lib', 'filegroup']: - for fn in target['src']: - language = target['language'] - if produces_object(fn): - obj_base = os.path.splitext(os.path.basename(fn))[0] - if obj_base in obj_producer_to_source[language]: - if obj_producer_to_source[language][obj_base] != fn: - print( - 'target %s (%s) produces an aliased object file with %s' - % (target['name'], fn, - obj_producer_to_source[language][obj_base])) - else: - obj_producer_to_source[language][obj_base] = fn - -assert errors == 0 diff --git a/tools/run_tests/sanity/core_banned_functions.py b/tools/run_tests/sanity/core_banned_functions.py index 1d3f2eba8a..8afd826453 100755 --- a/tools/run_tests/sanity/core_banned_functions.py +++ b/tools/run_tests/sanity/core_banned_functions.py @@ -30,7 +30,8 @@ BANNED_EXCEPT = { ['src/core/lib/slice/slice_buffer.cc'], 'grpc_slice_ref(': ['src/core/lib/slice/slice.cc'], 'grpc_slice_unref(': ['src/core/lib/slice/slice.cc'], - 'grpc_error_create(': ['src/core/lib/iomgr/error.cc'], + 'grpc_error_create(': + ['src/core/lib/iomgr/error.cc', 'src/core/lib/iomgr/error_cfstream.cc'], 'grpc_error_ref(': ['src/core/lib/iomgr/error.cc'], 'grpc_error_unref(': ['src/core/lib/iomgr/error.cc'], 'grpc_os_error(': ['src/core/lib/iomgr/error.cc'], diff --git a/tools/run_tests/sanity/sanity_tests.yaml b/tools/run_tests/sanity/sanity_tests.yaml index a15473db0f..ac0d4c70e5 100644 --- a/tools/run_tests/sanity/sanity_tests.yaml +++ b/tools/run_tests/sanity/sanity_tests.yaml @@ -2,7 +2,6 @@ - script: tools/run_tests/sanity/check_bazel_workspace.py - script: tools/run_tests/sanity/check_cache_mk.sh - script: tools/run_tests/sanity/check_owners.sh -- script: tools/run_tests/sanity/check_sources_and_headers.py - script: tools/run_tests/sanity/check_shellcheck.sh - script: tools/run_tests/sanity/check_submodules.sh - script: tools/run_tests/sanity/check_test_filtering.py |