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 with Foundry setting common to both manual run and runs started by Kokoro 17# see https://github.com/bazelbuild/bazel-toolchains/tree/master/bazelrc 18# for examples and more documentation 19 20startup --host_jvm_args=-Dbazel.DigestFunction=SHA256 21 22build --crosstool_top=@rbe_default//cc:toolchain 23build --extra_toolchains=@rbe_default//config:cc-toolchain 24# Use custom execution platforms defined in third_party/toolchains 25build --extra_execution_platforms=@rbe_default//config:platform 26build --host_platform=@rbe_default//config:platform 27build --platforms=@rbe_default//config:platform 28 29build --spawn_strategy=remote 30build --strategy=Javac=remote 31build --strategy=Closure=remote 32build --genrule_strategy=remote 33build --remote_timeout=7200 # very large value to avoid problems like https://github.com/grpc/grpc/issues/20777 34 35build --remote_instance_name=projects/grpc-testing/instances/default_instance 36 37build --verbose_failures=true 38 39build --experimental_strict_action_env=true 40build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 41 42# don't use port server 43build --define GRPC_PORT_ISOLATED_RUNTIME=1 44# without verbose gRPC logs the test outputs are not very useful 45test --test_env=GRPC_VERBOSITY=debug 46 47# we assume the default bazel RBE build is on linux, 48# so filter out stuff that should not be built or run there. 49build --test_tag_filters=-no_linux 50build --build_tag_filters=-no_linux 51 52# address sanitizer: most settings are already in %workspace%/.bazelrc 53# we only need a few additional ones that are Foundry specific 54build:asan --copt=-gmlt 55# use double the default value for "moderate" and "long" timeout as sanitizer 56# tests tend to be slower 57build:asan --test_timeout=60,600,1800,3600 58build:asan --test_tag_filters=-no_linux,-noasan,-qps_json_driver 59 60# memory sanitizer: most settings are already in %workspace%/.bazelrc 61# we only need a few additional ones that are Foundry specific 62build:msan --copt=-gmlt 63# "moderate" timeout 3x the default, "long" timeout 2x the default 64build:msan --test_timeout=60,900,1800,3600 65# TODO(jtattermusch): revisit the disabled tests 66build:msan --test_tag_filters=-no_linux,-nomsan,-json_run_localhost 67build:msan --cxxopt=--stdlib=libc++ 68# setting LD_LIBRARY_PATH is necessary 69# to avoid "libc++.so.1: cannot open shared object file" 70build:msan --action_env=LD_LIBRARY_PATH=/usr/local/lib 71build:msan --host_crosstool_top=@rbe_default//cc:toolchain 72# override the config-agnostic crosstool_top 73build:msan --crosstool_top=@rbe_msan//cc:toolchain 74 75# thread sanitizer: most settings are already in %workspace%/.bazelrc 76# we only need a few additional ones that are Foundry specific 77build:tsan --copt=-gmlt 78# use double the default value for "moderate" and "long" timeout as sanitizer 79# tests tend to be slower 80build:tsan --test_timeout=60,600,1800,3600 81build:tsan --test_tag_filters=-no_linux,-notsan,-qps_json_driver 82build:tsan --extra_execution_platforms=@rbe_default//config:platform 83 84# undefined behavior sanitizer: most settings are already in %workspace%/.bazelrc 85# we only need a few additional ones that are Foundry specific 86build:ubsan --copt=-gmlt 87# use double the default value for "moderate" and "long" timeout as sanitizer 88# tests tend to be slower 89build:ubsan --test_timeout=60,600,1800,3600 90# override the config-agnostic crosstool_top 91# how to update the bazel toolchain for ubsan: 92# - check for the latest released version in https://github.com/bazelbuild/bazel-toolchains/tree/master/configs/experimental/ubuntu16_04_clang 93# - you might need to update the bazel_toolchains dependency in grpc_deps.bzl 94build:ubsan --crosstool_top=@bazel_toolchains//configs/experimental/ubuntu16_04_clang/1.3/bazel_0.29.1/ubsan:toolchain 95