diff options
Diffstat (limited to 'tools/run_tests')
26 files changed, 1091 insertions, 26 deletions
diff --git a/tools/run_tests/artifact_targets.py b/tools/run_tests/artifact_targets.py index e61c46d8b5..3e08c1d62b 100644 --- a/tools/run_tests/artifact_targets.py +++ b/tools/run_tests/artifact_targets.py @@ -43,10 +43,10 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, for k,v in environ.iteritems(): docker_args += ['-e', '%s=%s' % (k, v)] docker_env = {'DOCKERFILE_DIR': dockerfile_dir, - 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh', + 'DOCKER_RUN_SCRIPT': 'tools/run_tests/dockerize/docker_run.sh', 'OUTPUT_DIR': 'artifacts'} jobspec = jobset.JobSpec( - cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, + cmdline=['tools/run_tests/dockerize/build_and_run_docker.sh'] + docker_args, environ=docker_env, shortname='build_artifact.%s' % (name), timeout_seconds=30*60, diff --git a/tools/run_tests/build_package_ruby.sh b/tools/run_tests/build_package_ruby.sh index 1a5b94348d..e44428bf7e 100755 --- a/tools/run_tests/build_package_ruby.sh +++ b/tools/run_tests/build_package_ruby.sh @@ -32,6 +32,8 @@ set -ex cd $(dirname $0)/../.. +base=$(pwd) + mkdir -p artifacts/ # All the ruby packages have been built in the artifact phase already @@ -41,3 +43,25 @@ cp -r $EXTERNAL_GIT_ROOT/architecture={x86,x64},language=ruby,platform={windows, # TODO: all the artifact builder configurations generate a grpc-VERSION.gem # source distribution package, and only one of them will end up # in the artifacts/ directory. They should be all equivalent though. + +for arch in {x86,x64}; do + case $arch in + x64) + ruby_arch=x86_64 + ;; + *) + ruby_arch=$arch + ;; + esac + for plat in {windows,linux,macos}; do + input_dir="$EXTERNAL_GIT_ROOT/architecture=$arch,language=protoc,platform=$plat/artifacts" + output_dir="$base/src/ruby/tools/bin/${ruby_arch}-${plat}" + mkdir -p $output_dir + cp $input_dir/protoc* $output_dir/ + cp $input_dir/grpc_ruby_plugin* $output_dir/ + done +done + +cd $base/src/ruby/tools +gem build grpc-tools.gemspec +cp ./grpc-tools*.gem $base/artifacts/ diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py index 34cc1cd710..ae918be21d 100644 --- a/tools/run_tests/distribtest_targets.py +++ b/tools/run_tests/distribtest_targets.py @@ -44,9 +44,9 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, for k,v in environ.iteritems(): docker_args += ['-e', '%s=%s' % (k, v)] docker_env = {'DOCKERFILE_DIR': dockerfile_dir, - 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh'} + 'DOCKER_RUN_SCRIPT': 'tools/run_tests/dockerize/docker_run.sh'} jobspec = jobset.JobSpec( - cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, + cmdline=['tools/run_tests/dockerize/build_and_run_docker.sh'] + docker_args, environ=docker_env, shortname='distribtest.%s' % (name), timeout_seconds=30*60, diff --git a/tools/run_tests/dockerize/build_and_run_docker.sh b/tools/run_tests/dockerize/build_and_run_docker.sh new file mode 100755 index 0000000000..1ef34b2f96 --- /dev/null +++ b/tools/run_tests/dockerize/build_and_run_docker.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# Copyright 2016, 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. +# +# Builds docker image and runs a command under it. +# You should never need to call this script on your own. + +set -ex + +cd $(dirname $0)/../../.. +git_root=$(pwd) +cd - + +# Inputs +# DOCKERFILE_DIR - Directory in which Dockerfile file is located. +# DOCKER_RUN_SCRIPT - Script to run under docker (relative to grpc repo root) +# OUTPUT_DIR - Directory that will be copied from inside docker after finishing. +# $@ - Extra args to pass to docker run + +# Use image name based on Dockerfile location checksum +DOCKER_IMAGE_NAME=$(basename $DOCKERFILE_DIR)_$(sha1sum $DOCKERFILE_DIR/Dockerfile | cut -f1 -d\ ) + +# Make sure docker image has been built. Should be instantaneous if so. +docker build -t $DOCKER_IMAGE_NAME $DOCKERFILE_DIR + +# Choose random name for docker container +CONTAINER_NAME="build_and_run_docker_$(uuidgen)" + +# Run command inside docker +docker run \ + "$@" \ + -e EXTERNAL_GIT_ROOT="/var/local/jenkins/grpc" \ + -e THIS_IS_REALLY_NEEDED='see https://github.com/docker/docker/issues/14203 for why docker is awful' \ + -v "$git_root:/var/local/jenkins/grpc:ro" \ + -w /var/local/git/grpc \ + --name=$CONTAINER_NAME \ + $DOCKER_IMAGE_NAME \ + bash -l "/var/local/jenkins/grpc/$DOCKER_RUN_SCRIPT" || FAILED="true" + +# Copy output artifacts +if [ "$OUTPUT_DIR" != "" ] +then + docker cp "$CONTAINER_NAME:/var/local/git/grpc/$OUTPUT_DIR" "$git_root" || FAILED="true" +fi + +# remove the container, possibly killing it first +docker rm -f $CONTAINER_NAME || true + +if [ "$FAILED" != "" ] +then + exit 1 +fi diff --git a/tools/run_tests/dockerize/build_docker_and_run_tests.sh b/tools/run_tests/dockerize/build_docker_and_run_tests.sh new file mode 100755 index 0000000000..c2ea6f2c6e --- /dev/null +++ b/tools/run_tests/dockerize/build_docker_and_run_tests.sh @@ -0,0 +1,99 @@ +#!/bin/bash +# Copyright 2015, 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. +# +# This script is invoked by run_tests.py to accommodate "test under docker" +# scenario. You should never need to call this script on your own. + +set -ex + +cd $(dirname $0)/../../.. +git_root=$(pwd) +cd - + +# Ensure existence of ccache directory +mkdir -p /tmp/ccache + +# Ensure existence of the home directory for XDG caches (e.g. what pip uses for +# its cache location now that --download-cache is deprecated). +mkdir -p /tmp/xdg-cache-home + +# Create a local branch so the child Docker script won't complain +git branch -f jenkins-docker + +# Inputs +# DOCKERFILE_DIR - Directory in which Dockerfile file is located. +# DOCKER_RUN_SCRIPT - Script to run under docker (relative to grpc repo root) + +# Use image name based on Dockerfile location checksum +DOCKER_IMAGE_NAME=$(basename $DOCKERFILE_DIR)_$(sha1sum $DOCKERFILE_DIR/Dockerfile | cut -f1 -d\ ) + +# Make sure docker image has been built. Should be instantaneous if so. +docker build -t $DOCKER_IMAGE_NAME $DOCKERFILE_DIR + +# Choose random name for docker container +CONTAINER_NAME="run_tests_$(uuidgen)" + +# Git root as seen by the docker instance +docker_instance_git_root=/var/local/jenkins/grpc + +# Run tests inside docker +docker run \ + -e "RUN_TESTS_COMMAND=$RUN_TESTS_COMMAND" \ + -e "config=$config" \ + -e "arch=$arch" \ + -e CCACHE_DIR=/tmp/ccache \ + -e XDG_CACHE_HOME=/tmp/xdg-cache-home \ + -e THIS_IS_REALLY_NEEDED='see https://github.com/docker/docker/issues/14203 for why docker is awful' \ + -e HOST_GIT_ROOT=$git_root \ + -e LOCAL_GIT_ROOT=$docker_instance_git_root \ + -e "BUILD_ID=$BUILD_ID" \ + -i $TTY_FLAG \ + -v "$git_root:$docker_instance_git_root" \ + -v /tmp/ccache:/tmp/ccache \ + -v /tmp/npm-cache:/tmp/npm-cache \ + -v /tmp/xdg-cache-home:/tmp/xdg-cache-home \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -v $(which docker):/bin/docker \ + -w /var/local/git/grpc \ + --name=$CONTAINER_NAME \ + $DOCKER_IMAGE_NAME \ + bash -l "/var/local/jenkins/grpc/$DOCKER_RUN_SCRIPT" || DOCKER_FAILED="true" + +docker cp "$CONTAINER_NAME:/var/local/git/grpc/reports.zip" $git_root || true +unzip -o $git_root/reports.zip -d $git_root || true +rm -f reports.zip + +# remove the container, possibly killing it first +docker rm -f $CONTAINER_NAME || true + +if [ "$DOCKER_FAILED" != "" ] && [ "$XML_REPORT" == "" ] +then + exit 1 +fi diff --git a/tools/run_tests/dockerize/build_interop_image.sh b/tools/run_tests/dockerize/build_interop_image.sh new file mode 100755 index 0000000000..48a216a124 --- /dev/null +++ b/tools/run_tests/dockerize/build_interop_image.sh @@ -0,0 +1,103 @@ +#!/bin/bash +# Copyright 2015, 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. +# +# This script is invoked by run_interop_tests.py to build the docker image +# for interop testing. You should never need to call this script on your own. + +set -x + +# Params: +# INTEROP_IMAGE - name of tag of the final interop image +# BASE_NAME - base name used to locate the base Dockerfile and build script +# TTY_FLAG - optional -t flag to make docker allocate tty +# BUILD_INTEROP_DOCKER_EXTRA_ARGS - optional args to be passed to the +# docker run command + +cd `dirname $0`/../../.. +GRPC_ROOT=`pwd` +MOUNT_ARGS="-v $GRPC_ROOT:/var/local/jenkins/grpc:ro" + +GRPC_JAVA_ROOT=`cd ../grpc-java && pwd` +if [ "$GRPC_JAVA_ROOT" != "" ] +then + MOUNT_ARGS+=" -v $GRPC_JAVA_ROOT:/var/local/jenkins/grpc-java:ro" +else + echo "WARNING: grpc-java not found, it won't be mounted to the docker container." +fi + +GRPC_GO_ROOT=`cd ../grpc-go && pwd` +if [ "$GRPC_GO_ROOT" != "" ] +then + MOUNT_ARGS+=" -v $GRPC_GO_ROOT:/var/local/jenkins/grpc-go:ro" +else + echo "WARNING: grpc-go not found, it won't be mounted to the docker container." +fi + +mkdir -p /tmp/ccache + +# Mount service account dir if available. +# If service_directory does not contain the service account JSON file, +# some of the tests will fail. +if [ -e $HOME/service_account ] +then + MOUNT_ARGS+=" -v $HOME/service_account:/var/local/jenkins/service_account:ro" +fi + +# Use image name based on Dockerfile checksum +BASE_IMAGE=${BASE_NAME}_base:`sha1sum tools/dockerfile/interoptest/$BASE_NAME/Dockerfile | cut -f1 -d\ ` + +# Make sure base docker image has been built. Should be instantaneous if so. +docker build -t $BASE_IMAGE --force-rm=true tools/dockerfile/interoptest/$BASE_NAME || exit $? + +# Create a local branch so the child Docker script won't complain +git branch -f jenkins-docker + +CONTAINER_NAME="build_${BASE_NAME}_$(uuidgen)" + +# Prepare image for interop tests, commit it on success. +(docker run \ + -e CCACHE_DIR=/tmp/ccache \ + -e THIS_IS_REALLY_NEEDED='see https://github.com/docker/docker/issues/14203 for why docker is awful' \ + -e THIS_IS_REALLY_NEEDED_ONCE_AGAIN='For issue 4835. See https://github.com/docker/docker/issues/14203 for why docker is awful' \ + -i $TTY_FLAG \ + $MOUNT_ARGS \ + $BUILD_INTEROP_DOCKER_EXTRA_ARGS \ + -v /tmp/ccache:/tmp/ccache \ + --name=$CONTAINER_NAME \ + $BASE_IMAGE \ + bash -l /var/local/jenkins/grpc/tools/dockerfile/interoptest/$BASE_NAME/build_interop.sh \ + && docker commit $CONTAINER_NAME $INTEROP_IMAGE \ + && echo "Successfully built image $INTEROP_IMAGE") +EXITCODE=$? + +# remove intermediate container, possibly killing it first +docker rm -f $CONTAINER_NAME + +exit $EXITCODE diff --git a/tools/run_tests/dockerize/build_interop_stress_image.sh b/tools/run_tests/dockerize/build_interop_stress_image.sh new file mode 100755 index 0000000000..4407c8da90 --- /dev/null +++ b/tools/run_tests/dockerize/build_interop_stress_image.sh @@ -0,0 +1,108 @@ +#!/bin/bash +# Copyright 2015, 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. +# +# This script is invoked by run_interop_tests.py to build the docker image +# for interop testing. You should never need to call this script on your own. + +set -x + +# Params: +# INTEROP_IMAGE - Name of tag of the final interop image +# INTEROP_IMAGE_REPOSITORY_TAG - Optional. If set, the created image will be tagged using +# the command: 'docker tag $INTEROP_IMAGE $INTEROP_IMAGE_REPOSITORY_TAG' +# BASE_NAME - Base name used to locate the base Dockerfile and build script +# BUILD_TYPE - The 'CONFIG' variable passed to the 'make' command (example: +# asan, tsan. Default value: opt). +# TTY_FLAG - optional -t flag to make docker allocate tty +# BUILD_INTEROP_DOCKER_EXTRA_ARGS - optional args to be passed to the +# docker run command + +cd `dirname $0`/../../.. +GRPC_ROOT=`pwd` +MOUNT_ARGS="-v $GRPC_ROOT:/var/local/jenkins/grpc:ro" + +GRPC_JAVA_ROOT=`cd ../grpc-java && pwd` +if [ "$GRPC_JAVA_ROOT" != "" ] +then + MOUNT_ARGS+=" -v $GRPC_JAVA_ROOT:/var/local/jenkins/grpc-java:ro" +else + echo "WARNING: grpc-java not found, it won't be mounted to the docker container." +fi + +GRPC_GO_ROOT=`cd ../grpc-go && pwd` +if [ "$GRPC_GO_ROOT" != "" ] +then + MOUNT_ARGS+=" -v $GRPC_GO_ROOT:/var/local/jenkins/grpc-go:ro" +else + echo "WARNING: grpc-go not found, it won't be mounted to the docker container." +fi + +mkdir -p /tmp/ccache + +# Mount service account dir if available. +# If service_directory does not contain the service account JSON file, +# some of the tests will fail. +if [ -e $HOME/service_account ] +then + MOUNT_ARGS+=" -v $HOME/service_account:/var/local/jenkins/service_account:ro" +fi + +# Use image name based on Dockerfile checksum +BASE_IMAGE=${BASE_NAME}_base:`sha1sum tools/dockerfile/stress_test/$BASE_NAME/Dockerfile | cut -f1 -d\ ` + +# Make sure base docker image has been built. Should be instantaneous if so. +docker build -t $BASE_IMAGE --force-rm=true tools/dockerfile/stress_test/$BASE_NAME || exit $? + +# Create a local branch so the child Docker script won't complain +git branch -f jenkins-docker + +CONTAINER_NAME="build_${BASE_NAME}_$(uuidgen)" + +# Prepare image for interop tests, commit it on success. +(docker run \ + -e CCACHE_DIR=/tmp/ccache \ + -e THIS_IS_REALLY_NEEDED='see https://github.com/docker/docker/issues/14203 for why docker is awful' \ + -e BUILD_TYPE=${BUILD_TYPE:=opt} \ + -i $TTY_FLAG \ + $MOUNT_ARGS \ + $BUILD_INTEROP_DOCKER_EXTRA_ARGS \ + -v /tmp/ccache:/tmp/ccache \ + --name=$CONTAINER_NAME \ + $BASE_IMAGE \ + bash -l /var/local/jenkins/grpc/tools/dockerfile/stress_test/$BASE_NAME/build_interop_stress.sh \ + && docker commit $CONTAINER_NAME $INTEROP_IMAGE \ + && ( if [ -n "$INTEROP_IMAGE_REPOSITORY_TAG" ]; then docker tag -f $INTEROP_IMAGE $INTEROP_IMAGE_REPOSITORY_TAG ; fi ) \ + && echo "Successfully built image $INTEROP_IMAGE") +EXITCODE=$? + +# remove intermediate container, possibly killing it first +docker rm -f $CONTAINER_NAME + +exit $EXITCODE diff --git a/tools/run_tests/dockerize/docker_run.sh b/tools/run_tests/dockerize/docker_run.sh new file mode 100755 index 0000000000..f04b1cfb55 --- /dev/null +++ b/tools/run_tests/dockerize/docker_run.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# Copyright 2016, 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. +# +# This script is invoked by build_docker_* inside a docker +# container. You should never need to call this script on your own. + +set -ex + +if [ "$RELATIVE_COPY_PATH" == "" ] +then + mkdir -p /var/local/git + git clone --recursive "$EXTERNAL_GIT_ROOT" /var/local/git/grpc +else + mkdir -p "/var/local/git/grpc/$RELATIVE_COPY_PATH" + cp -r "$EXTERNAL_GIT_ROOT/$RELATIVE_COPY_PATH"/* "/var/local/git/grpc/$RELATIVE_COPY_PATH" +fi + +$POST_GIT_STEP + +if [ -x "$(command -v rvm)" ] +then + rvm use ruby-2.1 +fi + +cd /var/local/git/grpc + +$RUN_COMMAND diff --git a/tools/run_tests/dockerize/docker_run_tests.sh b/tools/run_tests/dockerize/docker_run_tests.sh new file mode 100755 index 0000000000..2fc66c21f5 --- /dev/null +++ b/tools/run_tests/dockerize/docker_run_tests.sh @@ -0,0 +1,67 @@ +#!/bin/bash +# Copyright 2015, 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. +# +# This script is invoked by build_docker_and_run_tests.sh inside a docker +# container. You should never need to call this script on your own. + +set -e + +export CONFIG=$config +export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer + +# Ensure that programs depending on current-user-ownership of cache directories +# are satisfied (it's being mounted from outside the image). +chown $(whoami) $XDG_CACHE_HOME + +mkdir -p /var/local/git +git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc + +mkdir -p reports + +$POST_GIT_STEP + +exit_code=0 + +$RUN_TESTS_COMMAND || exit_code=$? + +cd reports +echo '<html><head></head><body>' > index.html +find . -maxdepth 1 -mindepth 1 -type d | sort | while read d ; do + d=${d#*/} + n=${d//_/ } + echo "<a href='$d/index.html'>$n</a><br />" >> index.html +done +echo '</body></html>' >> index.html +cd .. + +zip -r reports.zip reports +find . -name report.xml | xargs zip reports.zip + +exit $exit_code diff --git a/tools/run_tests/package_targets.py b/tools/run_tests/package_targets.py index 87bc4865ce..820b539b59 100644 --- a/tools/run_tests/package_targets.py +++ b/tools/run_tests/package_targets.py @@ -42,10 +42,10 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, for k,v in environ.iteritems(): docker_args += ['-e', '%s=%s' % (k, v)] docker_env = {'DOCKERFILE_DIR': dockerfile_dir, - 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh', + 'DOCKER_RUN_SCRIPT': 'tools/run_tests/dockerize/docker_run.sh', 'OUTPUT_DIR': 'artifacts'} jobspec = jobset.JobSpec( - cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, + cmdline=['tools/run_tests/dockerize/build_and_run_docker.sh'] + docker_args, environ=docker_env, shortname='build_package.%s' % (name), timeout_seconds=30*60, diff --git a/tools/run_tests/performance/run_worker_node.sh b/tools/run_tests/performance/run_worker_node.sh index 46b6ff0177..9a53a311f4 100755 --- a/tools/run_tests/performance/run_worker_node.sh +++ b/tools/run_tests/performance/run_worker_node.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. source ~/.nvm/nvm.sh -nvm use 0.12 +nvm use 4 set -ex diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 758be9304d..e813473421 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -542,7 +542,7 @@ def build_interop_image_jobspec(language, tag=None): env['BUILD_INTEROP_DOCKER_EXTRA_ARGS'] = \ '-v %s:/root/.composer/auth.json:ro' % host_file build_job = jobset.JobSpec( - cmdline=['tools/jenkins/build_interop_image.sh'], + cmdline=['tools/run_tests/dockerize/build_interop_image.sh'], environ=env, shortname='build_docker_%s' % (language), timeout_seconds=30*60) diff --git a/tools/run_tests/run_stress_tests.py b/tools/run_tests/run_stress_tests.py index 0ba8f51c58..e42ee24ffb 100755 --- a/tools/run_tests/run_stress_tests.py +++ b/tools/run_tests/run_stress_tests.py @@ -195,7 +195,7 @@ def build_interop_stress_image_jobspec(language, tag=None): tag = 'grpc_interop_stress_%s:%s' % (language.safename, uuid.uuid4()) env = {'INTEROP_IMAGE': tag, 'BASE_NAME': 'grpc_interop_stress_%s' % language.safename} - build_job = jobset.JobSpec(cmdline=['tools/jenkins/build_interop_stress_image.sh'], + build_job = jobset.JobSpec(cmdline=['tools/run_tests/dockerize/build_interop_stress_image.sh'], environ=env, shortname='build_docker_%s' % (language), timeout_seconds=30 * 60) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index dea481ef90..37291f4d3f 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -272,12 +272,17 @@ class NodeLanguage(object): def __init__(self): self.platform = platform_string() - self.node_version = '0.12' def configure(self, config, args): self.config = config self.args = args - _check_compiler(self.args.compiler, ['default']) + _check_compiler(self.args.compiler, ['default', 'node0.12', + 'node4', 'node5']) + if self.args.compiler == 'default': + self.node_version = '4' + else: + # Take off the word "node" + self.node_version = self.args.compiler[4:] def test_specs(self): if self.platform == 'windows': @@ -802,7 +807,8 @@ argp.add_argument('--compiler', 'gcc4.4', 'gcc4.9', 'gcc5.3', 'clang3.4', 'clang3.6', 'vs2010', 'vs2013', 'vs2015', - 'python2.7', 'python3.4'], + 'python2.7', 'python3.4', + 'node0.12', 'node4', 'node5'], default='default', help='Selects compiler to use. Allowed values depend on the platform and language.') argp.add_argument('--build_only', @@ -906,13 +912,13 @@ if args.use_docker: env = os.environ.copy() env['RUN_TESTS_COMMAND'] = run_tests_cmd env['DOCKERFILE_DIR'] = dockerfile_dir - env['DOCKER_RUN_SCRIPT'] = 'tools/jenkins/docker_run_tests.sh' + env['DOCKER_RUN_SCRIPT'] = 'tools/run_tests/dockerize/docker_run_tests.sh' if args.xml_report: env['XML_REPORT'] = args.xml_report if not args.travis: env['TTY_FLAG'] = '-t' # enables Ctrl-C when not on Jenkins. - subprocess.check_call(['tools/jenkins/build_docker_and_run_tests.sh'], + subprocess.check_call(['tools/run_tests/dockerize/build_docker_and_run_tests.sh'], shell=True, env=env) sys.exit(0) diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index f546f3b995..8c67d2f844 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4140,7 +4140,8 @@ "grpc_transport_chttp2_client_insecure", "grpc_transport_chttp2_client_secure", "grpc_transport_chttp2_server_insecure", - "grpc_transport_chttp2_server_secure" + "grpc_transport_chttp2_server_secure", + "grpc_transport_cronet_client_secure" ], "headers": [], "language": "c", @@ -5903,6 +5904,7 @@ ], "headers": [ "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", @@ -5913,6 +5915,7 @@ "name": "grpc_codegen", "src": [ "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", @@ -6012,6 +6015,7 @@ "tsi" ], "headers": [ + "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "src/core/lib/security/auth_filters.h", @@ -6027,6 +6031,7 @@ "language": "c", "name": "grpc_secure", "src": [ + "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "src/core/lib/http/httpcli_security_connector.c", @@ -6265,6 +6270,121 @@ { "deps": [], "headers": [ + "include/grpc/byte_buffer.h", + "include/grpc/grpc.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", + "include/grpc/status.h", + "include/grpc/support/alloc.h", + "include/grpc/support/atm.h", + "include/grpc/support/host_port.h", + "include/grpc/support/log.h", + "include/grpc/support/port_platform.h", + "include/grpc/support/slice.h", + "include/grpc/support/slice_buffer.h", + "include/grpc/support/string_util.h", + "include/grpc/support/sync.h", + "include/grpc/support/time.h", + "include/grpc/support/useful.h", + "src/core/ext/transport/chttp2/transport/incoming_metadata.h", + "src/core/lib/channel/channel_stack.h", + "src/core/lib/channel/context.h", + "src/core/lib/debug/trace.h", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/support/string.h", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h", + "third_party/objective_c/Cronet/cronet_c_for_grpc.h" + ], + "language": "c", + "name": "grpc_transport_cronet_client_secure", + "src": [ + "include/grpc/byte_buffer.h", + "include/grpc/grpc.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", + "include/grpc/status.h", + "include/grpc/support/alloc.h", + "include/grpc/support/atm.h", + "include/grpc/support/host_port.h", + "include/grpc/support/log.h", + "include/grpc/support/port_platform.h", + "include/grpc/support/slice.h", + "include/grpc/support/slice_buffer.h", + "include/grpc/support/string_util.h", + "include/grpc/support/sync.h", + "include/grpc/support/time.h", + "include/grpc/support/useful.h", + "src/core/ext/transport/chttp2/transport/incoming_metadata.h", + "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", + "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", + "src/core/ext/transport/cronet/transport/cronet_transport.c", + "src/core/lib/channel/channel_stack.h", + "src/core/lib/channel/context.h", + "src/core/lib/debug/trace.h", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/support/string.h", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h" + ], + "third_party": false, + "type": "filegroup" + }, + { + "deps": [], + "headers": [ "third_party/nanopb/pb.h", "third_party/nanopb/pb_common.h", "third_party/nanopb/pb_decode.h", diff --git a/tools/run_tests/stress_test/configs/asan.json b/tools/run_tests/stress_test/configs/asan.json index cb9f55763b..7ae11ccbf1 100644 --- a/tools/run_tests/stress_test/configs/asan.json +++ b/tools/run_tests/stress_test/configs/asan.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_cxx_asan" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "asan" } diff --git a/tools/run_tests/stress_test/configs/csharp.json b/tools/run_tests/stress_test/configs/csharp.json new file mode 100644 index 0000000000..406949557d --- /dev/null +++ b/tools/run_tests/stress_test/configs/csharp.json @@ -0,0 +1,90 @@ +{ + "dockerImages": { + "grpc_stress_csharp" : { + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", + "dockerFileDir": "grpc_interop_stress_csharp" + } + }, + + "clientTemplates": { + "baseTemplates": { + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py", + "pollIntervalSecs": 60, + "clientArgs": { + "num_channels_per_server":5, + "num_stubs_per_channel":10, + "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", + "metrics_port": 8081 + }, + "metricsPort": 8081, + "metricsArgs": { + "metrics_server_address": "localhost:8081", + "total_only": "true" + } + } + }, + "templates": { + "csharp_client": { + "baseTemplate": "default", + "stressClientCmd": [ + "mono", + "/var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.StressClient/bin/Debug/Grpc.IntegrationTesting.StressClient.exe" + ], + "metricsClientCmd": ["/var/local/git/grpc/bins/opt/metrics_client"] + } + } + }, + + "serverTemplates": { + "baseTemplates":{ + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py", + "serverPort": 8080, + "serverArgs": { + "port": 8080 + } + } + }, + "templates": { + "csharp_server": { + "baseTemplate": "default", + "stressServerCmd": [ + "mono", + "/var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Server/bin/Debug/Grpc.IntegrationTesting.Server.exe" + ] + } + } + }, + + "testMatrix": { + "serverPodSpecs": { + "stress-server-csharp": { + "serverTemplate": "csharp_server", + "dockerImage": "grpc_stress_csharp", + "numInstances": 1 + } + }, + + "clientPodSpecs": { + "stress-client-csharp": { + "clientTemplate": "csharp_client", + "dockerImage": "grpc_stress_csharp", + "numInstances": 10, + "serverPodSpec": "stress-server-csharp" + } + } + }, + + "globalSettings": { + "buildDockerImages": true, + "pollIntervalSecs": 60, + "testDurationSecs": 7200, + "kubernetesProxyPort": 8001, + "datasetIdNamePrefix": "stress_test_csharp", + "summaryTableId": "summary", + "qpsTableId": "qps", + "podWarmupSecs": 60 + } +} + diff --git a/tools/run_tests/stress_test/configs/go.json b/tools/run_tests/stress_test/configs/go.json index 36b465e763..f1b2b523d3 100644 --- a/tools/run_tests/stress_test/configs/go.json +++ b/tools/run_tests/stress_test/configs/go.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_go" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_go" } }, diff --git a/tools/run_tests/stress_test/configs/java.json b/tools/run_tests/stress_test/configs/java.json index 275384c066..2ce6c00780 100644 --- a/tools/run_tests/stress_test/configs/java.json +++ b/tools/run_tests/stress_test/configs/java.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_java" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_java" } }, diff --git a/tools/run_tests/stress_test/configs/node-cxx.json b/tools/run_tests/stress_test/configs/node-cxx.json index c4245bf9df..094c1236e7 100644 --- a/tools/run_tests/stress_test/configs/node-cxx.json +++ b/tools/run_tests/stress_test/configs/node-cxx.json @@ -1,12 +1,12 @@ { "dockerImages": { "grpc_stress_cxx_opt" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "opt" }, "grpc_stress_node": { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_node" } }, diff --git a/tools/run_tests/stress_test/configs/node.json b/tools/run_tests/stress_test/configs/node.json index 7a48c56a5e..85eb9e0003 100644 --- a/tools/run_tests/stress_test/configs/node.json +++ b/tools/run_tests/stress_test/configs/node.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_node" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_node" } }, diff --git a/tools/run_tests/stress_test/configs/opt-tsan-asan.json b/tools/run_tests/stress_test/configs/opt-tsan-asan.json index 936d15169e..fcb3678c02 100644 --- a/tools/run_tests/stress_test/configs/opt-tsan-asan.json +++ b/tools/run_tests/stress_test/configs/opt-tsan-asan.json @@ -1,17 +1,17 @@ { "dockerImages": { "grpc_stress_cxx_opt" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "opt" }, "grpc_stress_cxx_tsan": { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "tsan" }, "grpc_stress_cxx_asan": { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "asan" } diff --git a/tools/run_tests/stress_test/configs/opt.json b/tools/run_tests/stress_test/configs/opt.json index f45b824048..5e0e930d45 100644 --- a/tools/run_tests/stress_test/configs/opt.json +++ b/tools/run_tests/stress_test/configs/opt.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_cxx_opt" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "opt" } diff --git a/tools/run_tests/stress_test/configs/ruby.json b/tools/run_tests/stress_test/configs/ruby.json new file mode 100644 index 0000000000..7e2afcbb69 --- /dev/null +++ b/tools/run_tests/stress_test/configs/ruby.json @@ -0,0 +1,92 @@ +{ + "dockerImages": { + "grpc_stress_ruby" : { + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", + "dockerFileDir": "grpc_interop_stress_ruby" + } + }, + + "clientTemplates": { + "baseTemplates": { + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py", + "pollIntervalSecs": 60, + "clientArgs": { + "num_channels_per_server":5, + "num_stubs_per_channel":10, + "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", + "metrics_port": 8081 + }, + "metricsPort": 8081, + "metricsArgs": { + "metrics_server_address": "localhost:8081", + "total_only": "true" + } + } + }, + "templates": { + "ruby_client": { + "baseTemplate": "default", + "stressClientCmd": [ + "/var/local/git/grpc/tools/gcp/stress_test/run_ruby.sh", + "ruby", + "/var/local/git/grpc/src/ruby/stress/stress_client.rb" + ], + "metricsClientCmd": ["/var/local/git/grpc/bins/opt/metrics_client"] + } + } + }, + + "serverTemplates": { + "baseTemplates":{ + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py", + "serverPort": 8080, + "serverArgs": { + "port": 8080 + } + } + }, + "templates": { + "ruby_server": { + "baseTemplate": "default", + "stressServerCmd": [ + "/var/local/git/grpc/tools/gcp/stress_test/run_ruby.sh", + "ruby", + "/var/local/git/grpc/src/ruby/pb/test/server.rb" + ] + } + } + }, + + "testMatrix": { + "serverPodSpecs": { + "stress-server-ruby": { + "serverTemplate": "ruby_server", + "dockerImage": "grpc_stress_ruby", + "numInstances": 1 + } + }, + + "clientPodSpecs": { + "stress-client-ruby": { + "clientTemplate": "ruby_client", + "dockerImage": "grpc_stress_ruby", + "numInstances": 10, + "serverPodSpec": "stress-server-ruby" + } + } + }, + + "globalSettings": { + "buildDockerImages": true, + "pollIntervalSecs": 60, + "testDurationSecs": 7200, + "kubernetesProxyPort": 8001, + "datasetIdNamePrefix": "stress_test_ruby", + "summaryTableId": "summary", + "qpsTableId": "qps", + "podWarmupSecs": 60 + } +} + diff --git a/tools/run_tests/stress_test/configs/tsan.json b/tools/run_tests/stress_test/configs/tsan.json index 6ef3bdf7ea..abc759c79d 100644 --- a/tools/run_tests/stress_test/configs/tsan.json +++ b/tools/run_tests/stress_test/configs/tsan.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_cxx_tsan" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "tsan" } diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 0fd77854d2..cf1154426f 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -57759,6 +57759,22 @@ }, { "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/03a72675e1969f836094f1ecfec2a7b34418e306" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, + { + "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/03b9be1fa172dff5d1543be079b9c64fa2c9a278" ], "ci_platforms": [ @@ -57775,6 +57791,22 @@ }, { "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/0416afd6875d9ba55f1e5f86a6456a5445d5e576" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, + { + "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/052c8f28e5884bb48f0d504461272cd3a5893215" ], "ci_platforms": [ @@ -57919,6 +57951,22 @@ }, { "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/08c42ef29eff83052c5887855f2fa3e07ebe470c" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, + { + "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/09938e3256d06a8e168eb038d8a58b8462f7f697" ], "ci_platforms": [ @@ -58367,6 +58415,22 @@ }, { "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/1ba889ea1543297824e99e641e6ca8b91f45732e" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, + { + "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/1cf17783de9e662f3720847f2d83d86dcdcab500" ], "ci_platforms": [ @@ -59151,6 +59215,22 @@ }, { "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/3b09bf453c6f93983c24c4d5481e55d66213f93a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, + { + "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/3ca5da2f.bin" ], "ci_platforms": [ @@ -59503,6 +59583,22 @@ }, { "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/49cb33cbb60f041e8e99dd718993acd2c3354416" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, + { + "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/4aa883d0.bin" ], "ci_platforms": [ @@ -59951,6 +60047,22 @@ }, { "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/59743fe120be6ae1aed1c02230ee1bb460f621ee" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, + { + "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/597fdab5.bin" ], "ci_platforms": [ @@ -61343,6 +61455,22 @@ }, { "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/a5ccb8f124d8ddb5350b90bc0d6b96db280cb7c9" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, + { + "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/a7e64803.bin" ], "ci_platforms": [ @@ -61359,6 +61487,22 @@ }, { "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/a7fac1265a384fe9e45a9ee3d708b79c4e80505e" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, + { + "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/a8d229374635fa6f2a75ca1669892e1bc244e719" ], "ci_platforms": [ @@ -61503,6 +61647,22 @@ }, { "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/aaf049720c707d4e14e47e7eb31d6a2dda60e66a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, + { + "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/ad810f7f.bin" ], "ci_platforms": [ @@ -61967,6 +62127,22 @@ }, { "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/c4e4c7572e005e18d56eac407033da058737a5ab" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, + { + "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/c559f565.bin" ], "ci_platforms": [ @@ -62271,6 +62447,22 @@ }, { "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/crash-dae0f07934a527989f23f06e630710ff6ca8c809" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, + { + "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/crash-e34b0a9a428001cb4094a9ebca76329f578811a4" ], "ci_platforms": [ @@ -62591,6 +62783,22 @@ }, { "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/e96ad9c17795e52edc810a08d4fc61fe8790002a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, + { + "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/e9bbe2fe47b7b9c2683e7f17f4a33625c6ffbd8c" ], "ci_platforms": [ @@ -62911,6 +63119,22 @@ }, { "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/fa202a5f51cd49f8ea5af60c5f403f797c01c504" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ] + }, + { + "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/fa36b4280d9e28edd81c5e4d192d1a5c2765e5e4" ], "ci_platforms": [ |