diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2018-10-24 17:19:18 +0200 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2018-10-24 23:31:54 +0200 |
commit | bfcce96efc7b26523ce78716301a4e3b5fe4baed (patch) | |
tree | 1ad0d991085f2489796176c1ea1b77b6f33835e2 /tools | |
parent | 9e4b7622039f8d17cb479815a7442acde52cf01d (diff) |
align bazel asan configuration
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bazel.rc | 1 | ||||
-rwxr-xr-x | tools/internal_ci/linux/grpc_asan_on_foundry.sh | 4 | ||||
-rw-r--r-- | tools/internal_ci/linux/pull_request/grpc_asan_on_foundry.sh | 4 | ||||
-rw-r--r-- | tools/remote_build/README.md | 6 | ||||
-rw-r--r-- | tools/remote_build/rbe_common.bazelrc | 13 |
5 files changed, 20 insertions, 8 deletions
diff --git a/tools/bazel.rc b/tools/bazel.rc index bfdbc0cacb..35a9b37c81 100644 --- a/tools/bazel.rc +++ b/tools/bazel.rc @@ -9,7 +9,6 @@ build --copt=-DGRPC_BAZEL_BUILD build:opt --copt=-Wframe-larger-than=16384 build:asan --strip=never -build:asan --copt=-fsanitize-coverage=edge build:asan --copt=-fsanitize=address build:asan --copt=-O0 build:asan --copt=-fno-omit-frame-pointer diff --git a/tools/internal_ci/linux/grpc_asan_on_foundry.sh b/tools/internal_ci/linux/grpc_asan_on_foundry.sh index dfef004a60..24fbdf74c2 100755 --- a/tools/internal_ci/linux/grpc_asan_on_foundry.sh +++ b/tools/internal_ci/linux/grpc_asan_on_foundry.sh @@ -14,7 +14,5 @@ # limitations under the License. export UPLOAD_TEST_RESULTS=true -EXTRA_FLAGS="--copt=-gmlt --strip=never --copt=-fsanitize=address --linkopt=-fsanitize=address --test_timeout=3600 --cache_test_results=no" -EXCLUDE_TESTS="--test_tag_filters=-qps_json_driver,-json_run_localhost" -github/grpc/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh "${EXTRA_FLAGS}" "${EXCLUDE_TESTS}" +github/grpc/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh --config=asan --cache_test_results=no diff --git a/tools/internal_ci/linux/pull_request/grpc_asan_on_foundry.sh b/tools/internal_ci/linux/pull_request/grpc_asan_on_foundry.sh index 39c991f291..84b65a3eb1 100644 --- a/tools/internal_ci/linux/pull_request/grpc_asan_on_foundry.sh +++ b/tools/internal_ci/linux/pull_request/grpc_asan_on_foundry.sh @@ -13,7 +13,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -EXTRA_FLAGS="--copt=-gmlt --strip=never --copt=-fsanitize=address --linkopt=-fsanitize=address --test_timeout=3600" -EXCLUDE_TESTS="--test_tag_filters=-qps_json_driver,-json_run_localhost" -github/grpc/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh "${EXTRA_FLAGS}" "${EXCLUDE_TESTS}" +github/grpc/tools/internal_ci/linux/grpc_bazel_on_foundry_base.sh --config=asan diff --git a/tools/remote_build/README.md b/tools/remote_build/README.md index 019033e52e..77e7cabf2a 100644 --- a/tools/remote_build/README.md +++ b/tools/remote_build/README.md @@ -23,4 +23,8 @@ Run from repository root: bazel --bazelrc=tools/remote_build/manual.bazelrc test -c opt //test/... ``` -TODO: add instructions for running sanitizer builds +Sanitizer runs (asan, msan, tsan, ubsan): +``` +# manual run of bazel tests remotely on Foundry +bazel --bazelrc=tools/remote_build/manual.bazelrc test --config=asan //test/... +``` diff --git a/tools/remote_build/rbe_common.bazelrc b/tools/remote_build/rbe_common.bazelrc index ae382aeabe..b4959790b4 100644 --- a/tools/remote_build/rbe_common.bazelrc +++ b/tools/remote_build/rbe_common.bazelrc @@ -42,3 +42,16 @@ build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 build --define GRPC_PORT_ISOLATED_RUNTIME=1 # without verbose gRPC logs the test outputs are not very useful test --test_env=GRPC_VERBOSITY=debug + +# address sanitizer: most settings are already in %workspace%/.bazelrc +# we only need a few additional ones that are Foundry specific +build:asan --copt=-gmlt +# TODO(jtattermusch): use more reasonable test timeout +build:asan --test_timeout=3600 +build:asan --test_tag_filters=-qps_json_driver,-json_run_localhost +# TODO: revisit these from bazel.rc: +#build:asan --copt=-O0 +#build:asan --copt=-fno-omit-frame-pointer +#build:asan --copt=-DGPR_NO_DIRECT_SYSCALLS +#build:asan --action_env=ASAN_OPTIONS=detect_leaks=1:color=always +#build:asan --action_env=LSAN_OPTIONS=suppressions=test/core/util/lsan_suppressions.txt:report_objects=1 |