| 1 |
#@IgnoreInspection BashAddShebang |
| 2 |
# Copyright 2018 The gRPC Authors |
| 3 |
# |
| 4 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
# you may not use this file except in compliance with the License. |
| 6 |
# You may obtain a copy of the License at |
| 7 |
# |
| 8 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
# |
| 10 |
# Unless required by applicable law or agreed to in writing, software |
| 11 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
# See the License for the specific language governing permissions and |
| 14 |
# limitations under the License. |
| 15 |
|
| 16 |
# bazelrc file for running gRPC tests with RBE (on Linux) |
| 17 |
|
| 18 |
import %workspace%/tools/remote_build/include/rbe_remote_execution.bazelrc |
| 19 |
|
| 20 |
# Next section is linux-specific RBE configuration |
| 21 |
build --crosstool_top=@rbe_default//cc:toolchain |
| 22 |
build --extra_toolchains=@rbe_default//config:cc-toolchain |
| 23 |
# Use custom execution platforms defined in third_party/toolchains |
| 24 |
build --extra_execution_platforms=@rbe_default//config:platform |
| 25 |
build --host_platform=@rbe_default//config:platform |
| 26 |
build --platforms=@rbe_default//config:platform |
| 27 |
|
| 28 |
# we assume the default bazel RBE build is on linux, |
| 29 |
# so filter out stuff that should not be built or run there. |
| 30 |
build --test_tag_filters=-no_linux |
| 31 |
build --build_tag_filters=-no_linux |
| 32 |
|
| 33 |
import %workspace%/tools/remote_build/include/test_config_common.bazelrc |
| 34 |
|
| 35 |
build --jobs=100 |
| 36 |
|
| 37 |
build:opt --test_tag_filters=-noopt |
| 38 |
build:dbg --test_tag_filters=-nodbg |
| 39 |
|
| 40 |
# address sanitizer: most settings are already in %workspace%/.bazelrc |
| 41 |
# we only need a few additional ones that are Foundry specific |
| 42 |
build:asan --copt=-gmlt |
| 43 |
# use double the default value for "moderate" and "long" timeout as sanitizer |
| 44 |
# tests tend to be slower |
| 45 |
build:asan --test_timeout=60,600,1800,3600 |
| 46 |
build:asan --test_tag_filters=-no_linux,-noasan,-qps_json_driver |
| 47 |
|
| 48 |
# memory sanitizer: most settings are already in %workspace%/.bazelrc |
| 49 |
# we only need a few additional ones that are Foundry specific |
| 50 |
build:msan --copt=-gmlt |
| 51 |
# "moderate" timeout 3x the default, "long" timeout 2x the default |
| 52 |
build:msan --test_timeout=60,900,1800,3600 |
| 53 |
# TODO(jtattermusch): revisit the disabled tests |
| 54 |
build:msan --test_tag_filters=-no_linux,-nomsan,-json_run_localhost |
| 55 |
build:msan --cxxopt=--stdlib=libc++ |
| 56 |
# setting LD_LIBRARY_PATH is necessary |
| 57 |
# to avoid "libc++.so.1: cannot open shared object file" |
| 58 |
build:msan --action_env=LD_LIBRARY_PATH=/usr/local/lib |
| 59 |
build:msan --host_crosstool_top=@rbe_default//cc:toolchain |
| 60 |
# override the config-agnostic crosstool_top |
| 61 |
build:msan --crosstool_top=@rbe_msan//cc:toolchain |
| 62 |
|
| 63 |
# thread sanitizer: most settings are already in %workspace%/.bazelrc |
| 64 |
# we only need a few additional ones that are Foundry specific |
| 65 |
build:tsan --copt=-gmlt |
| 66 |
# use double the default value for "moderate" and "long" timeout as sanitizer |
| 67 |
# tests tend to be slower |
| 68 |
build:tsan --test_timeout=60,600,1800,3600 |
| 69 |
build:tsan --test_tag_filters=-no_linux,-notsan,-qps_json_driver |
| 70 |
|
| 71 |
# undefined behavior sanitizer: most settings are already in %workspace%/.bazelrc |
| 72 |
# we only need a few additional ones that are Foundry specific |
| 73 |
build:ubsan --copt=-gmlt |
| 74 |
# use double the default value for "moderate" and "long" timeout as sanitizer |
| 75 |
# tests tend to be slower |
| 76 |
build:ubsan --test_timeout=60,600,1800,3600 |
| 77 |
# RBE docker image only has a msan specific version of libc++, so to be able to link against it, |
| 78 |
# we need to involuntarily enable msan as well to be able to build. See b/200667821 |
| 79 |
# TODO(jtattermusch): disable memory sanitizer for ubsan build as soon as possible. |
| 80 |
build:ubsan --copt=-fsanitize=memory |
| 81 |
build:ubsan --copt=-fsanitize-recover=memory |
| 82 |
build:ubsan --linkopt=-fsanitize=memory |
| 83 |
build:ubsan --cxxopt=--stdlib=libc++ |
| 84 |
build:ubsan --action_env=MSAN_OPTIONS=halt_on_error=0 |
| 85 |
build:ubsan --test_tag_filters=-no_linux,-noubsan |