diff options
author | Yash Tibrewal <yashkt@google.com> | 2018-11-21 11:48:41 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2018-11-21 11:48:41 -0800 |
commit | 248e30467146efe8bc6f4f05140ae886d743c72d (patch) | |
tree | 73de256fb95a03f6c56fb7fb8e6e0b45f8f1d402 /tools/run_tests | |
parent | d704cfe3d11ae32a833e9b995f87d5e2d15bacef (diff) | |
parent | abbfd89dfc7e140fb1658f671b36e3276bfc37ce (diff) |
Merge branch 'master' into httpplumbing
Diffstat (limited to 'tools/run_tests')
-rwxr-xr-x | tools/run_tests/dockerize/build_docker_and_run_tests.sh | 5 | ||||
-rwxr-xr-x | tools/run_tests/dockerize/build_interop_image.sh | 4 | ||||
-rwxr-xr-x | tools/run_tests/dockerize/docker_run_tests.sh | 12 | ||||
-rw-r--r-- | tools/run_tests/generated/sources_and_headers.json | 6 | ||||
-rwxr-xr-x | tools/run_tests/helper_scripts/run_lcov.sh | 31 | ||||
-rwxr-xr-x | tools/run_tests/run_tests.py | 24 | ||||
-rwxr-xr-x | tools/run_tests/sanity/check_submodules.sh | 3 |
7 files changed, 16 insertions, 69 deletions
diff --git a/tools/run_tests/dockerize/build_docker_and_run_tests.sh b/tools/run_tests/dockerize/build_docker_and_run_tests.sh index 614049cae5..1741b3268b 100755 --- a/tools/run_tests/dockerize/build_docker_and_run_tests.sh +++ b/tools/run_tests/dockerize/build_docker_and_run_tests.sh @@ -22,9 +22,6 @@ cd "$(dirname "$0")/../../.." git_root=$(pwd) cd - -# Ensure existence of ccache directory -mkdir -p /tmp/ccache - # Inputs # DOCKERFILE_DIR - Directory in which Dockerfile file is located. # DOCKER_RUN_SCRIPT - Script to run under docker (relative to grpc repo root) @@ -57,7 +54,6 @@ docker run \ -e "RUN_TESTS_COMMAND=$RUN_TESTS_COMMAND" \ -e "config=$config" \ -e "arch=$arch" \ - -e CCACHE_DIR=/tmp/ccache \ -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 \ @@ -73,7 +69,6 @@ docker run \ --sysctl net.ipv6.conf.all.disable_ipv6=0 \ -v ~/.config/gcloud:/root/.config/gcloud \ -v "$git_root:$docker_instance_git_root" \ - -v /tmp/ccache:/tmp/ccache \ -v /tmp/npm-cache:/tmp/npm-cache \ -w /var/local/git/grpc \ --name="$CONTAINER_NAME" \ diff --git a/tools/run_tests/dockerize/build_interop_image.sh b/tools/run_tests/dockerize/build_interop_image.sh index fcfcdeb4e4..126dd4065e 100755 --- a/tools/run_tests/dockerize/build_interop_image.sh +++ b/tools/run_tests/dockerize/build_interop_image.sh @@ -64,8 +64,6 @@ else echo "WARNING: grpc-node 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. @@ -105,14 +103,12 @@ CONTAINER_NAME="build_${BASE_NAME}_$(uuidgen)" # shellcheck disable=SC2086 (docker run \ --cap-add SYS_PTRACE \ - -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" \ diff --git a/tools/run_tests/dockerize/docker_run_tests.sh b/tools/run_tests/dockerize/docker_run_tests.sh index c41734c92d..b7686e48ba 100755 --- a/tools/run_tests/dockerize/docker_run_tests.sh +++ b/tools/run_tests/dockerize/docker_run_tests.sh @@ -38,16 +38,8 @@ 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 .. - +# The easiest way to copy all the reports files from inside of +# the docker container is to zip them and then copy the zip. zip -r reports.zip reports find . -name report.xml -print0 | xargs -0 -r zip reports.zip find . -name sponge_log.xml -print0 | xargs -0 -r zip reports.zip diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 81af7829e5..4d9bbb0f09 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -10052,13 +10052,13 @@ "src/core/ext/filters/client_channel/lb_policy.h", "src/core/ext/filters/client_channel/lb_policy_factory.h", "src/core/ext/filters/client_channel/lb_policy_registry.h", - "src/core/ext/filters/client_channel/method_params.h", "src/core/ext/filters/client_channel/parse_address.h", "src/core/ext/filters/client_channel/proxy_mapper.h", "src/core/ext/filters/client_channel/proxy_mapper_registry.h", "src/core/ext/filters/client_channel/resolver.h", "src/core/ext/filters/client_channel/resolver_factory.h", "src/core/ext/filters/client_channel/resolver_registry.h", + "src/core/ext/filters/client_channel/resolver_result_parsing.h", "src/core/ext/filters/client_channel/retry_throttle.h", "src/core/ext/filters/client_channel/subchannel.h", "src/core/ext/filters/client_channel/subchannel_index.h" @@ -10091,8 +10091,6 @@ "src/core/ext/filters/client_channel/lb_policy_factory.h", "src/core/ext/filters/client_channel/lb_policy_registry.cc", "src/core/ext/filters/client_channel/lb_policy_registry.h", - "src/core/ext/filters/client_channel/method_params.cc", - "src/core/ext/filters/client_channel/method_params.h", "src/core/ext/filters/client_channel/parse_address.cc", "src/core/ext/filters/client_channel/parse_address.h", "src/core/ext/filters/client_channel/proxy_mapper.cc", @@ -10104,6 +10102,8 @@ "src/core/ext/filters/client_channel/resolver_factory.h", "src/core/ext/filters/client_channel/resolver_registry.cc", "src/core/ext/filters/client_channel/resolver_registry.h", + "src/core/ext/filters/client_channel/resolver_result_parsing.cc", + "src/core/ext/filters/client_channel/resolver_result_parsing.h", "src/core/ext/filters/client_channel/retry_throttle.cc", "src/core/ext/filters/client_channel/retry_throttle.h", "src/core/ext/filters/client_channel/subchannel.cc", diff --git a/tools/run_tests/helper_scripts/run_lcov.sh b/tools/run_tests/helper_scripts/run_lcov.sh deleted file mode 100755 index 9d8b6793fc..0000000000 --- a/tools/run_tests/helper_scripts/run_lcov.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# Copyright 2015 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -ex - -out=$(readlink -f "${1:-coverage}") - -root=$(readlink -f "$(dirname "$0")/../../..") -shift || true -tmp=$(mktemp) -cd "$root" -tools/run_tests/run_tests.py -c gcov -l c c++ "$@" || true -lcov --capture --directory . --output-file "$tmp" -genhtml "$tmp" --output-directory "$out" -rm "$tmp" -if which xdg-open > /dev/null -then - xdg-open "file://$out/index.html" -fi diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index a1f2aaab2f..f71be2a65e 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -756,9 +756,10 @@ class PythonLanguage(object): def dockerfile_dir(self): return 'tools/dockerfile/test/python_%s_%s' % ( - self.python_manager_name(), _docker_arch_suffix(self.args.arch)) + self._python_manager_name(), _docker_arch_suffix(self.args.arch)) - def python_manager_name(self): + def _python_manager_name(self): + """Choose the docker image to use based on python version.""" if self.args.compiler in [ 'python2.7', 'python3.5', 'python3.6', 'python3.7' ]: @@ -771,6 +772,7 @@ class PythonLanguage(object): return 'stretch_3.7' def _get_pythons(self, args): + """Get python runtimes to test with, based on current platform, architecture, compiler etc.""" if args.arch == 'x86': bits = '32' else: @@ -1340,9 +1342,9 @@ argp.add_argument( argp.add_argument( '-l', '--language', - choices=['all'] + sorted(_LANGUAGES.keys()), + choices=sorted(_LANGUAGES.keys()), nargs='+', - default=['all']) + required=True) argp.add_argument( '-S', '--stop_on_failure', default=False, action='store_const', const=True) argp.add_argument( @@ -1513,17 +1515,7 @@ build_config = run_config.build_config if args.travis: _FORCE_ENVIRON_FOR_WRAPPERS = {'GRPC_TRACE': 'api'} -if 'all' in args.language: - lang_list = list(_LANGUAGES.keys()) -else: - lang_list = args.language -# We don't support code coverage on some languages -if 'gcov' in args.config: - for bad in ['csharp', 'grpc-node', 'objc', 'sanity']: - if bad in lang_list: - lang_list.remove(bad) - -languages = set(_LANGUAGES[l] for l in lang_list) +languages = set(_LANGUAGES[l] for l in args.language) for l in languages: l.configure(run_config, args) @@ -1535,7 +1527,7 @@ if any(language.make_options() for language in languages): ) sys.exit(1) else: - # Combining make options is not clean and just happens to work. It allows C/C++ and C# to build + # Combining make options is not clean and just happens to work. It allows C & C++ to build # together, and is only used under gcov. All other configs should build languages individually. language_make_options = list( set([ diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index 8ea53dfec5..fa2628f18e 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -32,11 +32,14 @@ cat << EOF | awk '{ print $1 }' | sort > "$want_submodules" b29b21a81b32ec273f118f589f46d56ad3332420 third_party/boringssl (remotes/origin/chromium-stable) afc30d43eef92979b05776ec0963c9cede5fb80f third_party/boringssl-with-bazel (fips-20180716-116-gafc30d43e) 3be1924221e1326df520f8498d704a5c4c8d0cce third_party/cares/cares (cares-1_13_0) + 911001cdca003337bdb93fab32740cde61bafee3 third_party/data-plane-api (heads/master) 30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e third_party/gflags (v2.2.0-5-g30dbc81) + 80ed4d0bbf65d57cc267dfc63bd2584557f11f9b third_party/googleapis (common-protos-1_3_1-915-g80ed4d0bb) ec44c6c1675c25b9827aacd08c02433cccde7780 third_party/googletest (release-1.8.0) 6599cac0965be8e5a835ab7a5684bbef033d5ad0 third_party/libcxx (heads/release_60) 9245d481eb3e890f708ff2d7dadf2a10c04748ba third_party/libcxxabi (heads/release_60) 48cb18e5c419ddd23d9badcfe4e9df7bde1979b2 third_party/protobuf (v3.6.0.1-37-g48cb18e5) + e143189bf6f37b3957fb31743df6a1bcf4a8c685 third_party/protoc-gen-validate (v0.0.10) cacf7f1d4e3d44d871b605da3b647f07d718623f third_party/zlib (v1.2.11) EOF |