浏览代码

Merge pull request #12181 from matt-kwong/v1.4.x-backport

Backport Kokoro-related changes to v1.4.x
Matt Kwong 8 年之前
父节点
当前提交
231d4b69c4
共有 79 个文件被更改,包括 1442 次插入96 次删除
  1. 50 0
      tools/internal_ci/helper_scripts/gen_report_index.sh
  2. 5 0
      tools/internal_ci/helper_scripts/prepare_build_interop_rc
  3. 6 0
      tools/internal_ci/helper_scripts/prepare_build_linux_rc
  4. 38 0
      tools/internal_ci/helper_scripts/prepare_build_macos_interop_rc
  5. 81 0
      tools/internal_ci/helper_scripts/prepare_build_macos_rc
  6. 46 0
      tools/internal_ci/helper_scripts/prepare_build_windows.bat
  7. 30 0
      tools/internal_ci/linux/grpc_basictests_c_cpp_dbg.cfg
  8. 30 0
      tools/internal_ci/linux/grpc_basictests_c_cpp_opt.cfg
  9. 30 0
      tools/internal_ci/linux/grpc_basictests_multilang.cfg
  10. 40 0
      tools/internal_ci/linux/grpc_bazel.sh
  11. 23 0
      tools/internal_ci/linux/grpc_bazel_build.cfg
  12. 23 0
      tools/internal_ci/linux/grpc_bazel_test.cfg
  13. 1 0
      tools/internal_ci/linux/grpc_build_artifacts.cfg
  14. 7 1
      tools/internal_ci/linux/grpc_build_artifacts.sh
  15. 31 0
      tools/internal_ci/linux/grpc_build_boringssl_at_head.cfg
  16. 31 0
      tools/internal_ci/linux/grpc_build_protobuf_at_head.cfg
  17. 46 0
      tools/internal_ci/linux/grpc_build_submodule_at_head.sh
  18. 1 1
      tools/internal_ci/linux/grpc_interop_badserver_java.cfg
  19. 1 1
      tools/internal_ci/linux/grpc_interop_badserver_python.cfg
  20. 26 0
      tools/internal_ci/linux/grpc_interop_matrix.cfg
  21. 40 0
      tools/internal_ci/linux/grpc_interop_matrix.sh
  22. 2 1
      tools/internal_ci/linux/grpc_interop_tocloud.cfg
  23. 1 1
      tools/internal_ci/linux/grpc_interop_tocloud.sh
  24. 27 0
      tools/internal_ci/linux/grpc_interop_toprod.cfg
  25. 47 0
      tools/internal_ci/linux/grpc_interop_toprod.sh
  26. 7 1
      tools/internal_ci/linux/grpc_master.cfg
  27. 1 1
      tools/internal_ci/linux/grpc_master.sh
  28. 7 1
      tools/internal_ci/linux/grpc_portability.cfg
  29. 7 1
      tools/internal_ci/linux/grpc_portability_build_only.cfg
  30. 7 1
      tools/internal_ci/linux/grpc_pull_request_sanity.cfg
  31. 1 1
      tools/internal_ci/linux/grpc_run_tests_matrix.sh
  32. 45 0
      tools/internal_ci/linux/grpc_sanity.cfg
  33. 1 1
      tools/internal_ci/linux/grpc_sanity.sh
  34. 30 0
      tools/internal_ci/linux/pull_request/grpc_basictests_c_cpp_dbg.cfg
  35. 30 0
      tools/internal_ci/linux/pull_request/grpc_basictests_c_cpp_opt.cfg
  36. 7 1
      tools/internal_ci/linux/pull_request/grpc_basictests_multilang.cfg
  37. 7 1
      tools/internal_ci/linux/sanitizer/grpc_c_asan.cfg
  38. 1 1
      tools/internal_ci/linux/sanitizer/grpc_c_asan.sh
  39. 7 1
      tools/internal_ci/linux/sanitizer/grpc_c_msan.cfg
  40. 1 1
      tools/internal_ci/linux/sanitizer/grpc_c_msan.sh
  41. 7 1
      tools/internal_ci/linux/sanitizer/grpc_c_tsan.cfg
  42. 1 1
      tools/internal_ci/linux/sanitizer/grpc_c_tsan.sh
  43. 7 1
      tools/internal_ci/linux/sanitizer/grpc_c_ubsan.cfg
  44. 1 1
      tools/internal_ci/linux/sanitizer/grpc_c_ubsan.sh
  45. 7 1
      tools/internal_ci/linux/sanitizer/grpc_cpp_asan.cfg
  46. 1 1
      tools/internal_ci/linux/sanitizer/grpc_cpp_asan.sh
  47. 7 1
      tools/internal_ci/linux/sanitizer/grpc_cpp_tsan.cfg
  48. 1 1
      tools/internal_ci/linux/sanitizer/grpc_cpp_tsan.sh
  49. 31 0
      tools/internal_ci/linux/sanitizer/pull_request/grpc_c_asan.cfg
  50. 31 0
      tools/internal_ci/linux/sanitizer/pull_request/grpc_c_msan.cfg
  51. 31 0
      tools/internal_ci/linux/sanitizer/pull_request/grpc_c_tsan.cfg
  52. 31 0
      tools/internal_ci/linux/sanitizer/pull_request/grpc_c_ubsan.cfg
  53. 31 0
      tools/internal_ci/linux/sanitizer/pull_request/grpc_cpp_asan.cfg
  54. 31 0
      tools/internal_ci/linux/sanitizer/pull_request/grpc_cpp_tsan.cfg
  55. 31 0
      tools/internal_ci/macos/grpc_basictests_dbg.cfg
  56. 31 0
      tools/internal_ci/macos/grpc_basictests_opt.cfg
  57. 2 0
      tools/internal_ci/macos/grpc_build_artifacts.cfg
  58. 26 1
      tools/internal_ci/macos/grpc_build_artifacts.sh
  59. 2 1
      tools/internal_ci/macos/grpc_interop.cfg
  60. 2 1
      tools/internal_ci/macos/grpc_interop.sh
  61. 2 2
      tools/internal_ci/macos/grpc_master.sh
  62. 46 0
      tools/internal_ci/macos/grpc_run_tests_matrix.sh
  63. 31 0
      tools/internal_ci/macos/pull_request/grpc_basictests_dbg.cfg
  64. 31 0
      tools/internal_ci/macos/pull_request/grpc_basictests_opt.cfg
  65. 26 0
      tools/internal_ci/macos/pull_request/grpc_interop.cfg
  66. 30 0
      tools/internal_ci/windows/grpc_basictests.cfg
  67. 9 4
      tools/internal_ci/windows/grpc_build_artifacts.bat
  68. 1 0
      tools/internal_ci/windows/grpc_build_artifacts.cfg
  69. 30 0
      tools/internal_ci/windows/grpc_portability.cfg
  70. 7 1
      tools/internal_ci/windows/grpc_portability_build_only.cfg
  71. 1 5
      tools/internal_ci/windows/grpc_portability_master.bat
  72. 2 6
      tools/internal_ci/windows/grpc_run_tests_matrix.bat
  73. 7 1
      tools/internal_ci/windows/pull_request/grpc_basictests.cfg
  74. 30 0
      tools/internal_ci/windows/pull_request/grpc_portability.cfg
  75. 1 3
      tools/run_tests/artifacts/artifact_targets.py
  76. 2 15
      tools/run_tests/artifacts/build_artifact_python.bat
  77. 0 8
      tools/run_tests/artifacts/build_artifact_python.sh
  78. 17 2
      tools/run_tests/run_interop_tests.py
  79. 35 21
      tools/run_tests/run_tests_matrix.py

+ 50 - 0
tools/internal_ci/helper_scripts/gen_report_index.sh

@@ -0,0 +1,50 @@
+#!/bin/bash
+# Copyright 2017, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Generates index.html that will contain links to various test results on kokoro.
+set -e
+
+# change to grpc repo root
+cd $(dirname $0)/../../..
+
+# Kororo URLs are in the form "grpc/job/macos/job/master/job/grpc_build_artifacts"
+KOKORO_JOB_PATH=$(echo "${KOKORO_JOB_NAME}" | sed "s|/|/job/|g")
+
+mkdir -p reports
+
+echo '<html><head></head><body>' > reports/kokoro_index.html
+echo '<h1>'${KOKORO_JOB_NAME}', build '#${KOKORO_BUILD_NUMBER}'</h1>' >> reports/kokoro_index.html
+echo '<h2><a href="https://kokoro.corp.google.com/job/'${KOKORO_JOB_PATH}'/'${KOKORO_BUILD_NUMBER}'/">Kokoro build dashboard (internal only)</a></h2>' >> reports/kokoro_index.html
+echo '<h2><a href="https://sponge.corp.google.com/invocation?id='${KOKORO_BUILD_ID}'&searchFor=">Test result dashboard (internal only)</a></h2>' >> reports/kokoro_index.html
+echo '<h2><a href="test_report.html">HTML test report (Not available yet)</a></h2>' >> reports/kokoro_index.html
+echo '<h2><a href="test_log.txt">Test log (Not available yet)</a></h2>' >> reports/kokoro_index.html
+echo '</body></html>' >> reports/kokoro_index.html
+
+echo 'Created reports/kokoro_index.html report index'

+ 5 - 0
tools/internal_ci/helper_scripts/prepare_build_interop_rc

@@ -41,3 +41,8 @@ git submodule update --init
 # Set up gRPC-Go and gRPC-Java to test
 # Set up gRPC-Go and gRPC-Java to test
 git clone --recursive https://github.com/grpc/grpc-go ./../grpc-go
 git clone --recursive https://github.com/grpc/grpc-go ./../grpc-go
 git clone --recursive https://github.com/grpc/grpc-java ./../grpc-java
 git clone --recursive https://github.com/grpc/grpc-java ./../grpc-java
+
+# Download json file.
+mkdir ~/service_account
+gsutil cp gs://grpc-testing-secrets/interop/service_account/GrpcTesting-726eb1347f15.json ~/service_account
+export GOOGLE_APPLICATION_CREDENTIALS=~/service_account/GrpcTesting-726eb1347f15.json

+ 6 - 0
tools/internal_ci/helper_scripts/prepare_build_linux_rc

@@ -30,6 +30,8 @@
 
 
 # Source this rc script to prepare the environment for linux builds
 # Source this rc script to prepare the environment for linux builds
 
 
+tools/internal_ci/helper_scripts/gen_report_index.sh
+
 # Need to increase open files limit for c tests
 # Need to increase open files limit for c tests
 ulimit -n 32768
 ulimit -n 32768
 
 
@@ -37,6 +39,10 @@ ulimit -n 32768
 echo 'DOCKER_OPTS="${DOCKER_OPTS} --graph=/tmpfs/docker"' | sudo tee --append /etc/default/docker
 echo 'DOCKER_OPTS="${DOCKER_OPTS} --graph=/tmpfs/docker"' | sudo tee --append /etc/default/docker
 sudo service docker restart
 sudo service docker restart
 
 
+# Populate xdg-cache-home to workaround https://github.com/grpc/grpc/issues/11968
+sudo mkdir -p /tmp/xdg-cache-home
+PYTHONWARNINGS=ignore XDG_CACHE_HOME=/tmp/xdg-cache-home sudo -E pip install coverage==4.4 pylint==1.6.5
+
 # Download Docker images from DockerHub
 # Download Docker images from DockerHub
 export DOCKERHUB_ORGANIZATION=grpctesting
 export DOCKERHUB_ORGANIZATION=grpctesting
 
 

+ 38 - 0
tools/internal_ci/helper_scripts/prepare_build_macos_interop_rc

@@ -0,0 +1,38 @@
+#!/bin/bash
+# Copyright 2017 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.
+#
+# Source this rc script to prepare the environment for MacOS interop
+# builds. This rc script must be used in the root directory of gRPC
+# and is expected to be used before prepare_build_macos_rc
+
+export CONFIG=opt
+
+# Move gRPC repo to directory that Docker for Mac has drive access to
+mkdir /Users/kbuilder/workspace
+cp -R ./ /Users/kbuilder/workspace/grpc
+cd /Users/kbuilder/workspace/grpc
+
+# Needed for identifying Docker image sha1
+brew install md5sha1sum
+
+# Set up gRPC-Go and gRPC-Java to test
+git clone --recursive https://github.com/grpc/grpc-go ./../grpc-go
+git clone --recursive https://github.com/grpc/grpc-java ./../grpc-java
+
+# Set up Docker for Mac
+docker-machine create -d virtualbox --virtualbox-share-folder "/Users/kbuilder/workspace:" default
+docker-machine env default
+eval $(docker-machine env default)
+

+ 81 - 0
tools/internal_ci/helper_scripts/prepare_build_macos_rc

@@ -0,0 +1,81 @@
+#!/bin/bash
+# Copyright 2017, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Source this rc script to prepare the environment for macos builds
+
+tools/internal_ci/helper_scripts/gen_report_index.sh
+
+sudo launchctl limit maxfiles unlimited unlimited
+
+# show current maxfiles
+launchctl limit maxfiles
+
+ulimit -n 10000
+
+# show current limits
+ulimit -a
+
+# Add GCP credentials for BQ access
+# pip does not install google-api-python-client properly, so use easy_install
+sudo easy_install --upgrade google-api-python-client
+export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json
+
+# required to build protobuf
+brew install gflags
+
+set +ex  # rvm script is very verbose and exits with errorcode
+source $HOME/.rvm/scripts/rvm
+set -e  # rvm commands are very verbose
+rvm install ruby-2.4
+rvm osx-ssl-certs status all
+rvm osx-ssl-certs update all
+set -ex
+
+gem install bundler
+
+# cocoapods
+export LANG=en_US.UTF-8
+gem install cocoapods
+gem install xcpretty
+pod repo update  # needed by python
+
+# python
+brew install coreutils  # we need grealpath
+sudo pip install virtualenv
+sudo pip install -U six tox setuptools
+
+# python 3.4
+wget -q https://www.python.org/ftp/python/3.4.4/python-3.4.4-macosx10.6.pkg
+sudo installer -pkg python-3.4.4-macosx10.6.pkg -target /
+
+# set xcode version for Obj-C tests
+sudo xcode-select -switch /Applications/Xcode_8.2.1.app/Contents/Developer
+
+git submodule update --init

+ 46 - 0
tools/internal_ci/helper_scripts/prepare_build_windows.bat

@@ -0,0 +1,46 @@
+@rem Copyright 2017, Google Inc.
+@rem All rights reserved.
+@rem
+@rem Redistribution and use in source and binary forms, with or without
+@rem modification, are permitted provided that the following conditions are
+@rem met:
+@rem
+@rem     * Redistributions of source code must retain the above copyright
+@rem notice, this list of conditions and the following disclaimer.
+@rem     * Redistributions in binary form must reproduce the above
+@rem copyright notice, this list of conditions and the following disclaimer
+@rem in the documentation and/or other materials provided with the
+@rem distribution.
+@rem     * Neither the name of Google Inc. nor the names of its
+@rem contributors may be used to endorse or promote products derived from
+@rem this software without specific prior written permission.
+@rem
+@rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+@rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+@rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+@rem A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+@rem OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+@rem SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+@rem LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+@rem DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+@rem THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+@rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+@rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+@rem make sure msys binaries are preferred over cygwin binaries
+@rem set path to python 2.7
+set PATH=C:\tools\msys64\usr\bin;C:\Python27;%PATH%
+
+bash tools/internal_ci/helper_scripts/gen_report_index.sh
+
+@rem Update DNS settings to:
+@rem 1. allow resolving metadata.google.internal hostname
+@rem 2. make fetching default GCE credential by oauth2client work
+netsh interface ip set dns "Local Area Connection 8" static 169.254.169.254 primary
+netsh interface ip add dnsservers "Local Area Connection 8" 8.8.8.8 index=2
+netsh interface ip add dnsservers "Local Area Connection 8" 8.8.4.4 index=3
+
+@rem Needed for big_query_utils
+python -m pip install google-api-python-client
+
+git submodule update --init

+ 30 - 0
tools/internal_ci/linux/grpc_basictests_c_cpp_dbg.cfg

@@ -0,0 +1,30 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
+timeout_mins: 240
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f basictests linux corelang dbg --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results"
+}

+ 30 - 0
tools/internal_ci/linux/grpc_basictests_c_cpp_opt.cfg

@@ -0,0 +1,30 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
+timeout_mins: 240
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f basictests linux corelang opt --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results"
+}

+ 30 - 0
tools/internal_ci/linux/grpc_basictests_multilang.cfg

@@ -0,0 +1,30 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
+timeout_mins: 240
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f basictests linux multilang --inner_jobs 16 -j 2 --internal_ci --bq_result_table aggregate_results"
+}

+ 40 - 0
tools/internal_ci/linux/grpc_bazel.sh

@@ -0,0 +1,40 @@
+#!/bin/bash
+# Copyright 2017, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+set -ex
+
+# change to grpc repo root
+cd $(dirname $0)/../../..
+
+source tools/internal_ci/helper_scripts/prepare_build_linux_rc
+
+export DOCKERFILE_DIR=tools/dockerfile/test/bazel
+export DOCKER_RUN_SCRIPT=$BAZEL_SCRIPT
+exec tools/run_tests/dockerize/build_and_run_docker.sh

+ 23 - 0
tools/internal_ci/linux/grpc_bazel_build.cfg

@@ -0,0 +1,23 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_bazel.sh"
+timeout_mins: 60
+env_vars {
+  key: "BAZEL_SCRIPT"
+  value: "tools/jenkins/run_bazel_basic_in_docker.sh"
+}

+ 23 - 0
tools/internal_ci/linux/grpc_bazel_test.cfg

@@ -0,0 +1,23 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_bazel.sh"
+timeout_mins: 240
+env_vars {
+  key: "BAZEL_SCRIPT"
+  value: "tools/jenkins/run_bazel_full_in_docker.sh"
+}

+ 1 - 0
tools/internal_ci/linux/grpc_build_artifacts.cfg

@@ -35,6 +35,7 @@ timeout_mins: 120
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
     regex: "github/grpc/artifacts/**"
     regex: "github/grpc/artifacts/**"
   }
   }
 }
 }

+ 7 - 1
tools/internal_ci/linux/grpc_build_artifacts.sh

@@ -35,4 +35,10 @@ cd $(dirname $0)/../../..
 
 
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 
 
-tools/run_tests/task_runner.py -f artifact linux
+set +ex
+[[ -s /etc/profile.d/rvm.sh ]] && . /etc/profile.d/rvm.sh
+set -e  # rvm commands are very verbose
+rvm --default use ruby-2.4.1
+set -ex
+
+tools/run_tests/task_runner.py -f artifact linux -j 6

+ 31 - 0
tools/internal_ci/linux/grpc_build_boringssl_at_head.cfg

@@ -0,0 +1,31 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_build_submodule_at_head.sh"
+timeout_mins: 180
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+# Tiny hack: misusing an already whitelisted env var to pass submodule name
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "boringssl"
+}

+ 31 - 0
tools/internal_ci/linux/grpc_build_protobuf_at_head.cfg

@@ -0,0 +1,31 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_build_submodule_at_head.sh"
+timeout_mins: 180
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+# Tiny hack: misusing an already whitelisted env var to pass submodule name
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "protobuf"
+}

+ 46 - 0
tools/internal_ci/linux/grpc_build_submodule_at_head.sh

@@ -0,0 +1,46 @@
+#!/bin/bash
+# Copyright 2017, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Build portability tests with an updated submodule
+
+set -ex
+
+# change to grpc repo root
+cd $(dirname $0)/../../..
+
+source tools/internal_ci/helper_scripts/prepare_build_linux_rc
+
+# Update submodule and commit it so changes are passed to Docker
+(cd third_party/$RUN_TESTS_FLAGS && git pull origin master)
+tools/buildgen/generate_projects.sh
+git -c user.name='foo' -c user.email='foo@google.com' commit -a -m 'Update submodule'
+
+tools/run_tests/run_tests_matrix.py -f linux --internal_ci --build_only
+

+ 1 - 1
tools/internal_ci/linux/grpc_interop_badserver_java.cfg

@@ -35,7 +35,7 @@ build_file: "grpc/tools/internal_ci/linux/grpc_interop_badserver_java.sh"
 timeout_mins: 480
 timeout_mins: 480
 action {
 action {
   define_artifacts {
   define_artifacts {
-    regex: "**/report.xml",
+    regex: "**/report.xml"
     regex: "github/grpc/reports/**"
     regex: "github/grpc/reports/**"
   }
   }
 }
 }

+ 1 - 1
tools/internal_ci/linux/grpc_interop_badserver_python.cfg

@@ -35,7 +35,7 @@ build_file: "grpc/tools/internal_ci/linux/grpc_interop_badserver_python.sh"
 timeout_mins: 480
 timeout_mins: 480
 action {
 action {
   define_artifacts {
   define_artifacts {
-    regex: "**/report.xml",
+    regex: "**/report.xml"
     regex: "github/grpc/reports/**"
     regex: "github/grpc/reports/**"
   }
   }
 }
 }

+ 26 - 0
tools/internal_ci/linux/grpc_interop_matrix.cfg

@@ -0,0 +1,26 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_interop_matrix.sh"
+# grpc_interop tests can take 1 hours to complete.
+timeout_mins: 60
+action {
+  define_artifacts {
+    regex: "**/sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}

+ 40 - 0
tools/internal_ci/linux/grpc_interop_matrix.sh

@@ -0,0 +1,40 @@
+#!/bin/bash
+# Copyright 2017, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+set -ex
+
+export LANG=en_US.UTF-8
+
+# Enter the gRPC repo root
+cd $(dirname $0)/../../..
+
+source tools/internal_ci/helper_scripts/prepare_build_linux_rc
+
+tools/interop_matrix/run_interop_matrix_tests.py --language=all --release=all --report_file=sponge_log.xml $@

+ 2 - 1
tools/internal_ci/linux/grpc_interop_tocloud.cfg

@@ -35,6 +35,7 @@ build_file: "grpc/tools/internal_ci/linux/grpc_interop_tocloud.sh"
 timeout_mins: 480
 timeout_mins: 480
 action {
 action {
   define_artifacts {
   define_artifacts {
-    regex: "**/report.xml"
+    regex: "**/sponge_log.xml"
+    regex: "github/grpc/reports/**"
   }
   }
 }
 }

+ 1 - 1
tools/internal_ci/linux/grpc_interop_tocloud.sh

@@ -38,4 +38,4 @@ cd $(dirname $0)/../../..
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 source tools/internal_ci/helper_scripts/prepare_build_interop_rc
 source tools/internal_ci/helper_scripts/prepare_build_interop_rc
 
 
-tools/run_tests/run_interop_tests.py -l all -s all --use_docker --http2_interop -t -j 12 $@
+tools/run_tests/run_interop_tests.py -l all -s all --use_docker --http2_interop --internal_ci -t -j 12 $@

+ 27 - 0
tools/internal_ci/linux/grpc_interop_toprod.cfg

@@ -0,0 +1,27 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_interop_toprod.sh"
+# grpc_interop tests can take 6+ hours to complete.
+timeout_mins: 60
+action {
+  define_artifacts {
+    regex: "**/sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+

+ 47 - 0
tools/internal_ci/linux/grpc_interop_toprod.sh

@@ -0,0 +1,47 @@
+#!/bin/bash
+# Copyright 2017, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+set -ex
+
+export LANG=en_US.UTF-8
+
+# Enter the gRPC repo root
+cd $(dirname $0)/../../..
+
+source tools/internal_ci/helper_scripts/prepare_build_linux_rc
+source tools/internal_ci/helper_scripts/prepare_build_interop_rc
+
+tools/run_tests/run_interop_tests.py \
+    -l all \
+    --cloud_to_prod \
+    --cloud_to_prod_auth \
+    --prod_servers default gateway_v4 \
+    --use_docker --internal_ci -t -j 12 $@
+

+ 7 - 1
tools/internal_ci/linux/grpc_master.cfg

@@ -30,10 +30,16 @@
 # Config file for the internal CI (in protobuf text format)
 # Config file for the internal CI (in protobuf text format)
 
 
 # Location of the continuous shell script in repository.
 # Location of the continuous shell script in repository.
-build_file: "grpc/tools/internal_ci/linux/grpc_master.sh"
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
 timeout_mins: 240
 timeout_mins: 240
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
   }
   }
 }
 }
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f basictests linux --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results"
+}

+ 1 - 1
tools/internal_ci/linux/grpc_master.sh

@@ -35,4 +35,4 @@ cd $(dirname $0)/../../..
 
 
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 
 
-tools/run_tests/run_tests_matrix.py -f basictests linux --inner_jobs 16 -j 1 --internal_ci
+tools/run_tests/run_tests_matrix.py -f basictests linux --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results

+ 7 - 1
tools/internal_ci/linux/grpc_portability.cfg

@@ -30,10 +30,16 @@
 # Config file for the internal CI (in protobuf text format)
 # Config file for the internal CI (in protobuf text format)
 
 
 # Location of the continuous shell script in repository.
 # Location of the continuous shell script in repository.
-build_file: "grpc/tools/internal_ci/linux/grpc_portability.sh"
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
 timeout_mins: 1440
 timeout_mins: 1440
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
   }
   }
 }
 }
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f portability linux --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results"
+}

+ 7 - 1
tools/internal_ci/linux/grpc_portability_build_only.cfg

@@ -30,10 +30,16 @@
 # Config file for the internal CI (in protobuf text format)
 # Config file for the internal CI (in protobuf text format)
 
 
 # Location of the continuous shell script in repository.
 # Location of the continuous shell script in repository.
-build_file: "grpc/tools/internal_ci/linux/grpc_portability_build_only.sh"
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
 timeout_mins: 180
 timeout_mins: 180
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
   }
   }
 }
 }
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f portability linux --internal_ci --build_only"
+}

+ 7 - 1
tools/internal_ci/linux/grpc_pull_request_sanity.cfg

@@ -30,10 +30,16 @@
 # Config file for the internal CI (in protobuf text format)
 # Config file for the internal CI (in protobuf text format)
 
 
 # Location of the continuous shell script in repository.
 # Location of the continuous shell script in repository.
-build_file: "grpc/tools/internal_ci/linux/grpc_sanity.sh"
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
 timeout_mins: 30
 timeout_mins: 30
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
   }
   }
 }
 }
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f basictests linux sanity opt --inner_jobs 16 -j 1 --internal_ci"
+}

+ 1 - 1
tools/internal_ci/linux/grpc_portability_build_only.sh → tools/internal_ci/linux/grpc_run_tests_matrix.sh

@@ -35,4 +35,4 @@ cd $(dirname $0)/../../..
 
 
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 
 
-tools/run_tests/run_tests_matrix.py -f portability linux --internal_ci --build_only
+tools/run_tests/run_tests_matrix.py $RUN_TESTS_FLAGS

+ 45 - 0
tools/internal_ci/linux/grpc_sanity.cfg

@@ -0,0 +1,45 @@
+# Copyright 2017, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
+timeout_mins: 20
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f basictests linux sanity opt --inner_jobs 16 -j 1 --internal_ci"
+}

+ 1 - 1
tools/internal_ci/linux/grpc_sanity.sh

@@ -35,4 +35,4 @@ cd $(dirname $0)/../../..
 
 
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 
 
-tools/run_tests/run_tests.py -l sanity -c opt -t -x sponge_log.xml --use_docker --report_suite_name sanity_linux_opt
+tools/run_tests/run_tests_matrix.py -f basictests linux sanity opt --inner_jobs 16 -j 1 --internal_ci

+ 30 - 0
tools/internal_ci/linux/pull_request/grpc_basictests_c_cpp_dbg.cfg

@@ -0,0 +1,30 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
+timeout_mins: 240
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f basictests linux corelang dbg --inner_jobs 16 -j 1 --internal_ci"
+}

+ 30 - 0
tools/internal_ci/linux/pull_request/grpc_basictests_c_cpp_opt.cfg

@@ -0,0 +1,30 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
+timeout_mins: 240
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f basictests linux corelang opt --inner_jobs 16 -j 1 --internal_ci"
+}

+ 7 - 1
tools/internal_ci/macos/grpc_master.cfg → tools/internal_ci/linux/pull_request/grpc_basictests_multilang.cfg

@@ -30,10 +30,16 @@
 # Config file for the internal CI (in protobuf text format)
 # Config file for the internal CI (in protobuf text format)
 
 
 # Location of the continuous shell script in repository.
 # Location of the continuous shell script in repository.
-build_file: "grpc/tools/internal_ci/macos/grpc_master.sh"
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
 timeout_mins: 240
 timeout_mins: 240
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
   }
   }
 }
 }
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f basictests linux multilang --inner_jobs 16 -j 2 --internal_ci"
+}

+ 7 - 1
tools/internal_ci/linux/sanitizer/grpc_c_asan.cfg

@@ -30,10 +30,16 @@
 # Config file for the internal CI (in protobuf text format)
 # Config file for the internal CI (in protobuf text format)
 
 
 # Location of the continuous shell script in repository.
 # Location of the continuous shell script in repository.
-build_file: "grpc/tools/internal_ci/linux/sanitizer/grpc_c_asan.sh"
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
 timeout_mins: 1440
 timeout_mins: 1440
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
   }
   }
 }
 }
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f c asan --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results"
+}

+ 1 - 1
tools/internal_ci/linux/sanitizer/grpc_c_asan.sh

@@ -35,4 +35,4 @@ cd $(dirname $0)/../../../..
 
 
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 
 
-tools/run_tests/run_tests_matrix.py -f c asan --inner_jobs 16 -j 1 --internal_ci
+tools/run_tests/run_tests_matrix.py -f c asan --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results

+ 7 - 1
tools/internal_ci/linux/sanitizer/grpc_c_msan.cfg

@@ -30,10 +30,16 @@
 # Config file for the internal CI (in protobuf text format)
 # Config file for the internal CI (in protobuf text format)
 
 
 # Location of the continuous shell script in repository.
 # Location of the continuous shell script in repository.
-build_file: "grpc/tools/internal_ci/linux/sanitizer/grpc_c_msan.sh"
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
 timeout_mins: 1440
 timeout_mins: 1440
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
   }
   }
 }
 }
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f c msan --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results"
+}

+ 1 - 1
tools/internal_ci/linux/sanitizer/grpc_c_msan.sh

@@ -35,4 +35,4 @@ cd $(dirname $0)/../../../..
 
 
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 
 
-tools/run_tests/run_tests_matrix.py -f c msan --inner_jobs 16 -j 1 --internal_ci
+tools/run_tests/run_tests_matrix.py -f c msan --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results

+ 7 - 1
tools/internal_ci/linux/sanitizer/grpc_c_tsan.cfg

@@ -30,10 +30,16 @@
 # Config file for the internal CI (in protobuf text format)
 # Config file for the internal CI (in protobuf text format)
 
 
 # Location of the continuous shell script in repository.
 # Location of the continuous shell script in repository.
-build_file: "grpc/tools/internal_ci/linux/sanitizer/grpc_c_tsan.sh"
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
 timeout_mins: 1440
 timeout_mins: 1440
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
   }
   }
 }
 }
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f c tsan --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results"
+}

+ 1 - 1
tools/internal_ci/linux/sanitizer/grpc_c_tsan.sh

@@ -35,4 +35,4 @@ cd $(dirname $0)/../../../..
 
 
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 
 
-tools/run_tests/run_tests_matrix.py -f c tsan --inner_jobs 16 -j 1 --internal_ci
+tools/run_tests/run_tests_matrix.py -f c tsan --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results

+ 7 - 1
tools/internal_ci/linux/sanitizer/grpc_c_ubsan.cfg

@@ -30,10 +30,16 @@
 # Config file for the internal CI (in protobuf text format)
 # Config file for the internal CI (in protobuf text format)
 
 
 # Location of the continuous shell script in repository.
 # Location of the continuous shell script in repository.
-build_file: "grpc/tools/internal_ci/linux/sanitizer/grpc_c_ubsan.sh"
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
 timeout_mins: 1440
 timeout_mins: 1440
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
   }
   }
 }
 }
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f c ubsan --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results"
+}

+ 1 - 1
tools/internal_ci/linux/sanitizer/grpc_c_ubsan.sh

@@ -35,4 +35,4 @@ cd $(dirname $0)/../../../..
 
 
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 
 
-tools/run_tests/run_tests_matrix.py -f c ubsan --inner_jobs 16 -j 1 --internal_ci
+tools/run_tests/run_tests_matrix.py -f c ubsan --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results

+ 7 - 1
tools/internal_ci/linux/sanitizer/grpc_cpp_asan.cfg

@@ -30,10 +30,16 @@
 # Config file for the internal CI (in protobuf text format)
 # Config file for the internal CI (in protobuf text format)
 
 
 # Location of the continuous shell script in repository.
 # Location of the continuous shell script in repository.
-build_file: "grpc/tools/internal_ci/linux/sanitizer/grpc_cpp_asan.sh"
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
 timeout_mins: 1440
 timeout_mins: 1440
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
   }
   }
 }
 }
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f c++ asan --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results"
+}

+ 1 - 1
tools/internal_ci/linux/sanitizer/grpc_cpp_asan.sh

@@ -35,4 +35,4 @@ cd $(dirname $0)/../../../..
 
 
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 
 
-tools/run_tests/run_tests_matrix.py -f c++ asan --inner_jobs 16 -j 1 --internal_ci
+tools/run_tests/run_tests_matrix.py -f c++ asan --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results

+ 7 - 1
tools/internal_ci/linux/sanitizer/grpc_cpp_tsan.cfg

@@ -30,10 +30,16 @@
 # Config file for the internal CI (in protobuf text format)
 # Config file for the internal CI (in protobuf text format)
 
 
 # Location of the continuous shell script in repository.
 # Location of the continuous shell script in repository.
-build_file: "grpc/tools/internal_ci/linux/sanitizer/grpc_cpp_tsan.sh"
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
 timeout_mins: 1440
 timeout_mins: 1440
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
   }
   }
 }
 }
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f c++ tsan --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results"
+}

+ 1 - 1
tools/internal_ci/linux/sanitizer/grpc_cpp_tsan.sh

@@ -35,4 +35,4 @@ cd $(dirname $0)/../../../..
 
 
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 source tools/internal_ci/helper_scripts/prepare_build_linux_rc
 
 
-tools/run_tests/run_tests_matrix.py -f c++ tsan --inner_jobs 16 -j 1 --internal_ci
+tools/run_tests/run_tests_matrix.py -f c++ tsan --inner_jobs 16 -j 1 --internal_ci --bq_result_table aggregate_results

+ 31 - 0
tools/internal_ci/linux/sanitizer/pull_request/grpc_c_asan.cfg

@@ -0,0 +1,31 @@
+#!/bin/bash
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
+timeout_mins: 1440
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f c asan --inner_jobs 16 -j 1 --internal_ci --filter_pr_tests --base_branch origin/master --max_time=3600"
+}

+ 31 - 0
tools/internal_ci/linux/sanitizer/pull_request/grpc_c_msan.cfg

@@ -0,0 +1,31 @@
+#!/bin/bash
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
+timeout_mins: 1440
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f c msan --inner_jobs 16 -j 1 --internal_ci --filter_pr_tests --base_branch origin/master --max_time=3600"
+}

+ 31 - 0
tools/internal_ci/linux/sanitizer/pull_request/grpc_c_tsan.cfg

@@ -0,0 +1,31 @@
+#!/bin/bash
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
+timeout_mins: 1440
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f c tsan --inner_jobs 16 -j 1 --internal_ci --filter_pr_tests --base_branch origin/master --max_time=3600"
+}

+ 31 - 0
tools/internal_ci/linux/sanitizer/pull_request/grpc_c_ubsan.cfg

@@ -0,0 +1,31 @@
+#!/bin/bash
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
+timeout_mins: 1440
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f c ubsan --inner_jobs 16 -j 1 --internal_ci --filter_pr_tests --base_branch origin/master --max_time=3600"
+}

+ 31 - 0
tools/internal_ci/linux/sanitizer/pull_request/grpc_cpp_asan.cfg

@@ -0,0 +1,31 @@
+#!/bin/bash
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
+timeout_mins: 1440
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f c++ asan --inner_jobs 16 -j 1 --internal_ci --filter_pr_tests --base_branch origin/master --max_time=3600"
+}

+ 31 - 0
tools/internal_ci/linux/sanitizer/pull_request/grpc_cpp_tsan.cfg

@@ -0,0 +1,31 @@
+#!/bin/bash
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_run_tests_matrix.sh"
+timeout_mins: 1440
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f c++ tsan --inner_jobs 16 -j 1 --internal_ci --filter_pr_tests --base_branch origin/master --max_time=3600"
+}

+ 31 - 0
tools/internal_ci/macos/grpc_basictests_dbg.cfg

@@ -0,0 +1,31 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/macos/grpc_run_tests_matrix.sh"
+gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
+timeout_mins: 240
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f basictests macos dbg --internal_ci -j 1 --inner_jobs 4 --bq_result_table aggregate_results"
+}

+ 31 - 0
tools/internal_ci/macos/grpc_basictests_opt.cfg

@@ -0,0 +1,31 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/macos/grpc_run_tests_matrix.sh"
+gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
+timeout_mins: 240
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f basictests macos opt --internal_ci -j 1 --inner_jobs 4 --bq_result_table aggregate_results"
+}

+ 2 - 0
tools/internal_ci/macos/grpc_build_artifacts.cfg

@@ -31,10 +31,12 @@
 
 
 # Location of the continuous shell script in repository.
 # Location of the continuous shell script in repository.
 build_file: "grpc/tools/internal_ci/macos/grpc_build_artifacts.sh"
 build_file: "grpc/tools/internal_ci/macos/grpc_build_artifacts.sh"
+gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
 timeout_mins: 120
 timeout_mins: 120
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
     regex: "github/grpc/artifacts/**"
     regex: "github/grpc/artifacts/**"
   }
   }
 }
 }

+ 26 - 1
tools/internal_ci/macos/grpc_build_artifacts.sh

@@ -33,6 +33,31 @@ set -ex
 # change to grpc repo root
 # change to grpc repo root
 cd $(dirname $0)/../../..
 cd $(dirname $0)/../../..
 
 
-git submodule update --init
+source tools/internal_ci/helper_scripts/prepare_build_macos_rc
+
+# python 3.5
+wget -q https://www.python.org/ftp/python/3.5.2/python-3.5.2-macosx10.6.pkg
+sudo installer -pkg python-3.5.2-macosx10.6.pkg -target /
+
+# install cython for all python versions
+python2.7 -m pip install cython setuptools wheel
+python3.4 -m pip install cython setuptools wheel
+python3.5 -m pip install cython setuptools wheel
+python3.6 -m pip install cython setuptools wheel
+
+# node-gyp (needed for node artifacts)
+npm install -g node-gyp
+
+# php dependencies: pecl
+curl -O http://pear.php.net/go-pear.phar
+sudo php -d detect_unicode=0 go-pear.phar
+
+# needed to build ruby artifacts
+gem install rake-compiler
+wget https://raw.githubusercontent.com/grpc/grpc/master/tools/distrib/build_ruby_environment_macos.sh
+bash 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

+ 2 - 1
tools/internal_ci/macos/grpc_interop.cfg

@@ -31,10 +31,11 @@
 
 
 # Location of the continuous shell script in repository.
 # Location of the continuous shell script in repository.
 build_file: "grpc/tools/internal_ci/macos/grpc_interop.sh"
 build_file: "grpc/tools/internal_ci/macos/grpc_interop.sh"
+gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
 timeout_mins: 240
 timeout_mins: 240
 action {
 action {
   define_artifacts {
   define_artifacts {
-    regex: "**/*sponge_log.xml",
+    regex: "**/*sponge_log.xml"
     regex: "github/grpc/reports/**"
     regex: "github/grpc/reports/**"
   }
   }
 }
 }

+ 2 - 1
tools/internal_ci/macos/grpc_interop.sh

@@ -33,6 +33,7 @@ set -ex
 # change to grpc repo root
 # change to grpc repo root
 cd $(dirname $0)/../../..
 cd $(dirname $0)/../../..
 
 
-source tools/internal_ci/helper_scripts/prepare_build_interop_rc
+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

+ 2 - 2
tools/internal_ci/macos/grpc_master.sh

@@ -33,9 +33,9 @@ set -ex
 # change to grpc repo root
 # change to grpc repo root
 cd $(dirname $0)/../../..
 cd $(dirname $0)/../../..
 
 
-git submodule update --init
+source tools/internal_ci/helper_scripts/prepare_build_macos_rc
 
 
-tools/run_tests/run_tests_matrix.py -f basictests macos --internal_ci || FAILED="true"
+tools/run_tests/run_tests_matrix.py -f basictests macos --internal_ci -j 2 --inner_jobs 4 || FAILED="true"
 
 
 # kill port_server.py to prevent the build from hanging
 # kill port_server.py to prevent the build from hanging
 ps aux | grep port_server\\.py | awk '{print $2}' | xargs kill -9
 ps aux | grep port_server\\.py | awk '{print $2}' | xargs kill -9

+ 46 - 0
tools/internal_ci/macos/grpc_run_tests_matrix.sh

@@ -0,0 +1,46 @@
+#!/bin/bash
+# Copyright 2017, Google Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+set -ex
+
+# change to grpc repo root
+cd $(dirname $0)/../../..
+
+source tools/internal_ci/helper_scripts/prepare_build_macos_rc
+
+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
+
+if [ "$FAILED" != "" ]
+then
+  exit 1
+fi

+ 31 - 0
tools/internal_ci/macos/pull_request/grpc_basictests_dbg.cfg

@@ -0,0 +1,31 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/macos/grpc_run_tests_matrix.sh"
+gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
+timeout_mins: 240
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f basictests macos dbg --internal_ci -j 1 --inner_jobs 4"
+}

+ 31 - 0
tools/internal_ci/macos/pull_request/grpc_basictests_opt.cfg

@@ -0,0 +1,31 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/macos/grpc_run_tests_matrix.sh"
+gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
+timeout_mins: 240
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f basictests macos opt --internal_ci -j 1 --inner_jobs 4"
+}

+ 26 - 0
tools/internal_ci/macos/pull_request/grpc_interop.cfg

@@ -0,0 +1,26 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/macos/grpc_interop.sh"
+gfile_resources: "/bigstore/grpc-testing-secrets/gcp_credentials/GrpcTesting-d0eeee2db331.json"
+timeout_mins: 240
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}

+ 30 - 0
tools/internal_ci/windows/grpc_basictests.cfg

@@ -0,0 +1,30 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/windows/grpc_run_tests_matrix.bat"
+timeout_mins: 360
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f basictests windows -j 1 --inner_jobs 8 --internal_ci --bq_result_table aggregate_results"
+}

+ 9 - 4
tools/internal_ci/windows/grpc_build_artifacts.bat

@@ -27,14 +27,19 @@
 @rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 @rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 @rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 @rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-@rem make sure msys binaries are preferred over cygwin binaries
-@rem set path to python 2.7
-set PATH=C:\tools\msys64\usr\bin;C:\Python27;%PATH%
+@rem Move python installation from _32bit to _32bits where they are expected by python artifact builder
+@rem TODO(jtattermusch): get rid of this hack
+rename C:\Python27_32bit Python27_32bits
+rename C:\Python34_32bit Python34_32bits
+rename C:\Python35_32bit Python35_32bits
+rename C:\Python36_32bit Python36_32bits
+
+pacman -S --noconfirm mingw64/mingw-w64-x86_64-gcc mingw32/mingw-w64-i686-gcc
 
 
 @rem enter repo root
 @rem enter repo root
 cd /d %~dp0\..\..\..
 cd /d %~dp0\..\..\..
 
 
-git submodule update --init
+call tools/internal_ci/helper_scripts/prepare_build_windows.bat
 
 
 python tools/run_tests/task_runner.py -f artifact windows || goto :error
 python tools/run_tests/task_runner.py -f artifact windows || goto :error
 goto :EOF
 goto :EOF

+ 1 - 0
tools/internal_ci/windows/grpc_build_artifacts.cfg

@@ -35,6 +35,7 @@ timeout_mins: 120
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
     regex: "github/grpc/artifacts/**"
     regex: "github/grpc/artifacts/**"
   }
   }
 }
 }

+ 30 - 0
tools/internal_ci/windows/grpc_portability.cfg

@@ -0,0 +1,30 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/windows/grpc_run_tests_matrix.bat"
+timeout_mins: 360
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f portability windows -j 1 --inner_jobs 8 --internal_ci --bq_result_table aggregate_results"
+}

+ 7 - 1
tools/internal_ci/windows/grpc_portability_master.cfg → tools/internal_ci/windows/grpc_portability_build_only.cfg

@@ -30,10 +30,16 @@
 # Config file for the internal CI (in protobuf text format)
 # Config file for the internal CI (in protobuf text format)
 
 
 # Location of the continuous shell script in repository.
 # Location of the continuous shell script in repository.
-build_file: "grpc/tools/internal_ci/windows/grpc_portability_master.bat"
+build_file: "grpc/tools/internal_ci/windows/grpc_run_tests_matrix.bat"
 timeout_mins: 360
 timeout_mins: 360
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
   }
   }
 }
 }
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f portability windows --internal_ci  --build_only"
+}

+ 1 - 5
tools/internal_ci/windows/grpc_portability_master.bat

@@ -27,14 +27,10 @@
 @rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 @rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 @rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 @rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-@rem make sure msys binaries are preferred over cygwin binaries
-@rem set path to python 2.7
-set PATH=C:\tools\msys64\usr\bin;C:\Python27;%PATH%
-
 @rem enter repo root
 @rem enter repo root
 cd /d %~dp0\..\..\..
 cd /d %~dp0\..\..\..
 
 
-git submodule update --init
+call tools/internal_ci/helper_scripts/prepare_build_windows.bat
 
 
 python tools/run_tests/run_tests_matrix.py -f portability windows -j 1 --inner_jobs 8 --internal_ci || goto :error
 python tools/run_tests/run_tests_matrix.py -f portability windows -j 1 --inner_jobs 8 --internal_ci || goto :error
 goto :EOF
 goto :EOF

+ 2 - 6
tools/internal_ci/windows/grpc_master.bat → tools/internal_ci/windows/grpc_run_tests_matrix.bat

@@ -27,16 +27,12 @@
 @rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 @rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 @rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 @rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-@rem make sure msys binaries are preferred over cygwin binaries
-@rem set path to python 2.7
-set PATH=C:\tools\msys64\usr\bin;C:\Python27;%PATH%
-
 @rem enter repo root
 @rem enter repo root
 cd /d %~dp0\..\..\..
 cd /d %~dp0\..\..\..
 
 
-git submodule update --init
+call tools/internal_ci/helper_scripts/prepare_build_windows.bat
 
 
-python tools/run_tests/run_tests_matrix.py -f basictests windows -j 1 --inner_jobs 8 --internal_ci || goto :error
+python tools/run_tests/run_tests_matrix.py %RUN_TESTS_FLAGS% || goto :error
 goto :EOF
 goto :EOF
 
 
 :error
 :error

+ 7 - 1
tools/internal_ci/windows/grpc_master.cfg → tools/internal_ci/windows/pull_request/grpc_basictests.cfg

@@ -30,10 +30,16 @@
 # Config file for the internal CI (in protobuf text format)
 # Config file for the internal CI (in protobuf text format)
 
 
 # Location of the continuous shell script in repository.
 # Location of the continuous shell script in repository.
-build_file: "grpc/tools/internal_ci/windows/grpc_master.bat"
+build_file: "grpc/tools/internal_ci/windows/grpc_run_tests_matrix.bat"
 timeout_mins: 360
 timeout_mins: 360
 action {
 action {
   define_artifacts {
   define_artifacts {
     regex: "**/*sponge_log.xml"
     regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
   }
   }
 }
 }
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f basictests windows -j 1 --inner_jobs 8 --internal_ci"
+}

+ 30 - 0
tools/internal_ci/windows/pull_request/grpc_portability.cfg

@@ -0,0 +1,30 @@
+# Copyright 2017 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.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/windows/grpc_run_tests_matrix.bat"
+timeout_mins: 360
+action {
+  define_artifacts {
+    regex: "**/*sponge_log.xml"
+    regex: "github/grpc/reports/**"
+  }
+}
+
+env_vars {
+  key: "RUN_TESTS_FLAGS"
+  value: "-f portability windows -j 1 --inner_jobs 8 --internal_ci"
+}

+ 1 - 3
tools/run_tests/artifacts/artifact_targets.py

@@ -163,9 +163,7 @@ class PythonArtifact:
       return create_jobspec(self.name,
       return create_jobspec(self.name,
                             ['tools\\run_tests\\artifacts\\build_artifact_python.bat',
                             ['tools\\run_tests\\artifacts\\build_artifact_python.bat',
                              self.py_version,
                              self.py_version,
-                             '32' if self.arch == 'x86' else '64',
-                             dir
-                            ],
+                             '32' if self.arch == 'x86' else '64'],
                             environ=environ,
                             environ=environ,
                             use_workspace=True)
                             use_workspace=True)
     else:
     else:

+ 2 - 15
tools/run_tests/artifacts/build_artifact_python.bat

@@ -27,8 +27,8 @@
 @rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 @rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 @rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 @rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-
-set PATH=C:\%1;C:\%1\scripts;C:\msys64\mingw%2\bin;%PATH%
+@rem set path to python & mingw compiler
+set PATH=C:\%1;C:\%1\scripts;C:\msys64\mingw%2\bin;C:\tools\msys64\mingw%2\bin;%PATH%
 
 
 pip install --upgrade six
 pip install --upgrade six
 pip install --upgrade setuptools
 pip install --upgrade setuptools
@@ -36,16 +36,8 @@ pip install -rrequirements.txt
 
 
 set GRPC_PYTHON_BUILD_WITH_CYTHON=1
 set GRPC_PYTHON_BUILD_WITH_CYTHON=1
 
 
-@rem Multiple builds are running simultaneously, so to avoid distutils
-@rem file collisions, we build everything in a tmp directory
-@rem TODO(jtattermusch): it doesn't look like builds are actually running in parallel in the same dir
 mkdir -p %ARTIFACTS_OUT%
 mkdir -p %ARTIFACTS_OUT%
 set ARTIFACT_DIR=%cd%\%ARTIFACTS_OUT%
 set ARTIFACT_DIR=%cd%\%ARTIFACTS_OUT%
-set BUILD_DIR=C:\Windows\Temp\pygrpc-%3\
-mkdir %BUILD_DIR%
-xcopy /s/e/q %cd%\* %BUILD_DIR%
-pushd %BUILD_DIR%
-
 
 
 @rem Set up gRPC Python tools
 @rem Set up gRPC Python tools
 python tools\distrib\python\make_grpcio_tools.py
 python tools\distrib\python\make_grpcio_tools.py
@@ -64,16 +56,11 @@ pushd tools\distrib\python\grpcio_tools
 python setup.py bdist_wheel || goto :error
 python setup.py bdist_wheel || goto :error
 popd
 popd
 
 
-
 xcopy /Y /I /S dist\* %ARTIFACT_DIR% || goto :error
 xcopy /Y /I /S dist\* %ARTIFACT_DIR% || goto :error
 xcopy /Y /I /S tools\distrib\python\grpcio_tools\dist\* %ARTIFACT_DIR% || goto :error
 xcopy /Y /I /S tools\distrib\python\grpcio_tools\dist\* %ARTIFACT_DIR% || goto :error
 
 
-popd
-rmdir /s /q %BUILD_DIR%
-
 goto :EOF
 goto :EOF
 
 
 :error
 :error
 popd
 popd
-rmdir /s /q %BUILD_DIR%
 exit /b 1
 exit /b 1

+ 0 - 8
tools/run_tests/artifacts/build_artifact_python.sh

@@ -38,16 +38,8 @@ export PYTHON=${PYTHON:-python}
 export PIP=${PIP:-pip}
 export PIP=${PIP:-pip}
 export AUDITWHEEL=${AUDITWHEEL:-auditwheel}
 export AUDITWHEEL=${AUDITWHEEL:-auditwheel}
 
 
-# Because multiple builds run in parallel, some distutils file
-# operations may collide.  To avoid this, each build is run in
-# a temp directory
-# TODO(jtattermusch): it doesn't look like builds are actually running in parallel in the same dir
 mkdir -p "${ARTIFACTS_OUT}"
 mkdir -p "${ARTIFACTS_OUT}"
 ARTIFACT_DIR="$PWD/${ARTIFACTS_OUT}"
 ARTIFACT_DIR="$PWD/${ARTIFACTS_OUT}"
-BUILD_DIR=`mktemp -d "${TMPDIR:-/tmp}/pygrpc.XXXXXX"`
-trap "rm -rf $BUILD_DIR" EXIT
-cp -r * "$BUILD_DIR"
-cd "$BUILD_DIR"
 
 
 # Build the source distribution first because MANIFEST.in cannot override
 # Build the source distribution first because MANIFEST.in cannot override
 # exclusion of built shared objects among package resources (for some
 # exclusion of built shared objects among package resources (for some

+ 17 - 2
tools/run_tests/run_interop_tests.py

@@ -78,6 +78,13 @@ _TEST_TIMEOUT = 3*60
 # see https://github.com/grpc/grpc/issues/9779
 # see https://github.com/grpc/grpc/issues/9779
 _SKIP_DATA_FRAME_PADDING = ['data_frame_padding']
 _SKIP_DATA_FRAME_PADDING = ['data_frame_padding']
 
 
+# report suffix is important for reports to get picked up by internal CI
+_INTERNAL_CL_XML_REPORT = 'sponge_log.xml'
+
+# report suffix is important for reports to get picked up by internal CI
+_XML_REPORT = 'report.xml'
+
+
 class CXXLanguage:
 class CXXLanguage:
 
 
   def __init__(self):
   def __init__(self):
@@ -935,7 +942,12 @@ argp.add_argument('--insecure',
                   action='store_const',
                   action='store_const',
                   const=True,
                   const=True,
                   help='Whether to use secure channel.')
                   help='Whether to use secure channel.')
-
+argp.add_argument('--internal_ci',
+                  default=False,
+                  action='store_const',
+                  const=True,
+                  help=('Put reports into subdirectories to improve '
+                        'presentation of results by Internal CI.'))
 args = argp.parse_args()
 args = argp.parse_args()
 
 
 servers = set(s for s in itertools.chain.from_iterable(_SERVERS
 servers = set(s for s in itertools.chain.from_iterable(_SERVERS
@@ -1193,7 +1205,10 @@ try:
   write_cmdlog_maybe(server_manual_cmd_log, 'interop_server_cmds.sh')
   write_cmdlog_maybe(server_manual_cmd_log, 'interop_server_cmds.sh')
   write_cmdlog_maybe(client_manual_cmd_log, 'interop_client_cmds.sh')
   write_cmdlog_maybe(client_manual_cmd_log, 'interop_client_cmds.sh')
 
 
-  report_utils.render_junit_xml_report(resultset, 'report.xml')
+  xml_report_name = _XML_REPORT
+  if args.internal_ci:
+    xml_report_name = _INTERNAL_CL_XML_REPORT
+  report_utils.render_junit_xml_report(resultset, xml_report_name)
 
 
   for name, job in resultset.items():
   for name, job in resultset.items():
     if "http2" in name:
     if "http2" in name:

+ 35 - 21
tools/run_tests/run_tests_matrix.py

@@ -139,23 +139,37 @@ def _create_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS):
   test_jobs += _generate_jobs(languages=['sanity', 'php7'],
   test_jobs += _generate_jobs(languages=['sanity', 'php7'],
                              configs=['dbg', 'opt'],
                              configs=['dbg', 'opt'],
                              platforms=['linux'],
                              platforms=['linux'],
-                             labels=['basictests'],
+                             labels=['basictests', 'multilang'],
                              extra_args=extra_args,
                              extra_args=extra_args,
                              inner_jobs=inner_jobs)
                              inner_jobs=inner_jobs)
 
 
   # supported on all platforms.
   # supported on all platforms.
-  test_jobs += _generate_jobs(languages=['c', 'csharp', 'node', 'python'],
+  test_jobs += _generate_jobs(languages=['c'],
+                             configs=['dbg', 'opt'],
+                             platforms=['linux', 'macos', 'windows'],
+                             labels=['basictests', 'corelang'],
+                             extra_args=extra_args,
+                             inner_jobs=inner_jobs)
+  
+  test_jobs += _generate_jobs(languages=['csharp', 'node', 'python'],
                              configs=['dbg', 'opt'],
                              configs=['dbg', 'opt'],
                              platforms=['linux', 'macos', 'windows'],
                              platforms=['linux', 'macos', 'windows'],
-                             labels=['basictests'],
+                             labels=['basictests', 'multilang'],
                              extra_args=extra_args,
                              extra_args=extra_args,
                              inner_jobs=inner_jobs)
                              inner_jobs=inner_jobs)
 
 
   # supported on linux and mac.
   # supported on linux and mac.
-  test_jobs += _generate_jobs(languages=['c++', 'ruby', 'php'],
+  test_jobs += _generate_jobs(languages=['c++'],
+                              configs=['dbg', 'opt'],
+                              platforms=['linux', 'macos'],
+                              labels=['basictests', 'corelang'],
+                              extra_args=extra_args,
+                              inner_jobs=inner_jobs)
+  
+  test_jobs += _generate_jobs(languages=['ruby', 'php'],
                               configs=['dbg', 'opt'],
                               configs=['dbg', 'opt'],
                               platforms=['linux', 'macos'],
                               platforms=['linux', 'macos'],
-                              labels=['basictests'],
+                              labels=['basictests', 'multilang'],
                               extra_args=extra_args,
                               extra_args=extra_args,
                               inner_jobs=inner_jobs)
                               inner_jobs=inner_jobs)
 
 
@@ -163,7 +177,7 @@ def _create_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS):
   test_jobs += _generate_jobs(languages=['objc'],
   test_jobs += _generate_jobs(languages=['objc'],
                               configs=['dbg', 'opt'],
                               configs=['dbg', 'opt'],
                               platforms=['macos'],
                               platforms=['macos'],
-                              labels=['basictests'],
+                              labels=['basictests', 'multilang'],
                               extra_args=extra_args,
                               extra_args=extra_args,
                               inner_jobs=inner_jobs)
                               inner_jobs=inner_jobs)
 
 
@@ -171,13 +185,13 @@ def _create_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS):
   test_jobs += _generate_jobs(languages=['c'],
   test_jobs += _generate_jobs(languages=['c'],
                               configs=['msan', 'asan', 'tsan', 'ubsan'],
                               configs=['msan', 'asan', 'tsan', 'ubsan'],
                               platforms=['linux'],
                               platforms=['linux'],
-                              labels=['sanitizers'],
+                              labels=['sanitizers', 'corelang'],
                               extra_args=extra_args,
                               extra_args=extra_args,
                               inner_jobs=inner_jobs)
                               inner_jobs=inner_jobs)
   test_jobs += _generate_jobs(languages=['c++'],
   test_jobs += _generate_jobs(languages=['c++'],
                               configs=['asan', 'tsan'],
                               configs=['asan', 'tsan'],
                               platforms=['linux'],
                               platforms=['linux'],
-                              labels=['sanitizers'],
+                              labels=['sanitizers', 'corelang'],
                               extra_args=extra_args,
                               extra_args=extra_args,
                               inner_jobs=inner_jobs)
                               inner_jobs=inner_jobs)
 
 
@@ -192,7 +206,7 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS)
                               platforms=['linux'],
                               platforms=['linux'],
                               arch='x86',
                               arch='x86',
                               compiler='default',
                               compiler='default',
-                              labels=['portability'],
+                              labels=['portability', 'corelang'],
                               extra_args=extra_args,
                               extra_args=extra_args,
                               inner_jobs=inner_jobs)
                               inner_jobs=inner_jobs)
 
 
@@ -204,7 +218,7 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS)
                                 platforms=['linux'],
                                 platforms=['linux'],
                                 arch='x64',
                                 arch='x64',
                                 compiler=compiler,
                                 compiler=compiler,
-                                labels=['portability'],
+                                labels=['portability', 'corelang'],
                                 extra_args=extra_args,
                                 extra_args=extra_args,
                                 inner_jobs=inner_jobs)
                                 inner_jobs=inner_jobs)
 
 
@@ -216,14 +230,14 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS)
                                   platforms=['windows'],
                                   platforms=['windows'],
                                   arch=arch,
                                   arch=arch,
                                   compiler=compiler,
                                   compiler=compiler,
-                                  labels=['portability'],
+                                  labels=['portability', 'corelang'],
                                   extra_args=extra_args,
                                   extra_args=extra_args,
                                   inner_jobs=inner_jobs)
                                   inner_jobs=inner_jobs)
 
 
   # C and C++ with the c-ares DNS resolver on Linux
   # C and C++ with the c-ares DNS resolver on Linux
   test_jobs += _generate_jobs(languages=['c', 'c++'],
   test_jobs += _generate_jobs(languages=['c', 'c++'],
                               configs=['dbg'], platforms=['linux'],
                               configs=['dbg'], platforms=['linux'],
-                              labels=['portability'],
+                              labels=['portability', 'corelang'],
                               extra_args=extra_args,
                               extra_args=extra_args,
                               extra_envs={'GRPC_DNS_RESOLVER': 'ares'})
                               extra_envs={'GRPC_DNS_RESOLVER': 'ares'})
 
 
@@ -231,7 +245,7 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS)
   # C with the c-ares DNS resolver on Windonws
   # C with the c-ares DNS resolver on Windonws
   # test_jobs += _generate_jobs(languages=['c'],
   # test_jobs += _generate_jobs(languages=['c'],
   #                             configs=['dbg'], platforms=['windows'],
   #                             configs=['dbg'], platforms=['windows'],
-  #                             labels=['portability'],
+  #                             labels=['portability', 'corelang'],
   #                             extra_args=extra_args,
   #                             extra_args=extra_args,
   #                             extra_envs={'GRPC_DNS_RESOLVER': 'ares'})
   #                             extra_envs={'GRPC_DNS_RESOLVER': 'ares'})
 
 
@@ -243,7 +257,7 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS)
                               platforms=['linux', 'windows'],
                               platforms=['linux', 'windows'],
                               arch='default',
                               arch='default',
                               compiler='cmake',
                               compiler='cmake',
-                              labels=['portability'],
+                              labels=['portability', 'corelang'],
                               extra_args=extra_args + ['--build_only'],
                               extra_args=extra_args + ['--build_only'],
                               inner_jobs=inner_jobs)
                               inner_jobs=inner_jobs)
 
 
@@ -261,7 +275,7 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS)
                               platforms=['linux'],
                               platforms=['linux'],
                               arch='default',
                               arch='default',
                               compiler='python_alpine',
                               compiler='python_alpine',
-                              labels=['portability'],
+                              labels=['portability', 'multilang'],
                               extra_args=extra_args,
                               extra_args=extra_args,
                               inner_jobs=inner_jobs)
                               inner_jobs=inner_jobs)
 
 
@@ -270,7 +284,7 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS)
                               platforms=['linux'],
                               platforms=['linux'],
                               arch='default',
                               arch='default',
                               compiler='coreclr',
                               compiler='coreclr',
-                              labels=['portability'],
+                              labels=['portability', 'multilang'],
                               extra_args=extra_args,
                               extra_args=extra_args,
                               inner_jobs=inner_jobs)
                               inner_jobs=inner_jobs)
 
 
@@ -278,7 +292,7 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS)
                               configs=['dbg'],
                               configs=['dbg'],
                               platforms=['linux'],
                               platforms=['linux'],
                               iomgr_platform='uv',
                               iomgr_platform='uv',
-                              labels=['portability'],
+                              labels=['portability', 'corelang'],
                               extra_args=extra_args,
                               extra_args=extra_args,
                               inner_jobs=inner_jobs)
                               inner_jobs=inner_jobs)
 
 
@@ -287,7 +301,7 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS)
                               platforms=['linux'],
                               platforms=['linux'],
                               arch='default',
                               arch='default',
                               compiler='electron1.6',
                               compiler='electron1.6',
-                              labels=['portability'],
+                              labels=['portability', 'multilang'],
                               extra_args=extra_args,
                               extra_args=extra_args,
                               inner_jobs=inner_jobs)
                               inner_jobs=inner_jobs)
 
 
@@ -296,7 +310,7 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS)
                               platforms=['linux'],
                               platforms=['linux'],
                               arch='default',
                               arch='default',
                               compiler='node4',
                               compiler='node4',
-                              labels=['portability'],
+                              labels=['portability', 'multilang'],
                               extra_args=extra_args,
                               extra_args=extra_args,
                               inner_jobs=inner_jobs)
                               inner_jobs=inner_jobs)
 
 
@@ -305,7 +319,7 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS)
                               platforms=['linux'],
                               platforms=['linux'],
                               arch='default',
                               arch='default',
                               compiler='node6',
                               compiler='node6',
-                              labels=['portability'],
+                              labels=['portability', 'multilang'],
                               extra_args=extra_args,
                               extra_args=extra_args,
                               inner_jobs=inner_jobs)
                               inner_jobs=inner_jobs)
 
 
@@ -314,7 +328,7 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS)
                               platforms=['linux'],
                               platforms=['linux'],
                               arch='default',
                               arch='default',
                               compiler='node7',
                               compiler='node7',
-                              labels=['portability'],
+                              labels=['portability', 'multilang'],
                               extra_args=extra_args,
                               extra_args=extra_args,
                               inner_jobs=inner_jobs)
                               inner_jobs=inner_jobs)