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