Merge pull request #19664 from rmstar/cfstream_test_sanitizers

Run cfstream_test under ASAN and TSAN
pull/19684/head
rmstar 5 years ago committed by GitHub
commit a5af50665a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      tools/bazel.rc
  2. 23
      tools/internal_ci/macos/grpc_cfstream_asan.cfg
  3. 23
      tools/internal_ci/macos/grpc_cfstream_tsan.cfg
  4. 2
      tools/internal_ci/macos/grpc_run_bazel_tests.sh

@ -13,6 +13,9 @@ build:opt --copt=-Wframe-larger-than=16384
build:dbg --compilation_mode=dbg
build:asan --strip=never
# Workaround for https://github.com/bazelbuild/bazel/issues/6932
build:asan --copt -Wno-macro-redefined
build:asan --copt -D_FORTIFY_SOURCE=0
build:asan --copt=-fsanitize=address
build:asan --copt=-O0
build:asan --copt=-fno-omit-frame-pointer

@ -0,0 +1,23 @@
# Copyright 2019 The 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.
# Config file for the internal CI (in protobuf text format)
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/macos/grpc_run_bazel_tests.sh"
env_vars {
key: "RUN_TESTS_FLAGS"
value: "--config=asan"
}

@ -0,0 +1,23 @@
# Copyright 2019 The 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.
# Config file for the internal CI (in protobuf text format)
# Location of the continuous shell script in repository.
build_file: "grpc/tools/internal_ci/macos/grpc_run_bazel_tests.sh"
env_vars {
key: "RUN_TESTS_FLAGS"
value: "--config=tsan"
}

@ -29,7 +29,7 @@ which bazel
./tools/run_tests/start_port_server.py
# run cfstream_test separately because it messes with the network
bazel test --spawn_strategy=standalone --genrule_strategy=standalone --test_output=all //test/cpp/end2end:cfstream_test
bazel test $RUN_TESTS_FLAGS --spawn_strategy=standalone --genrule_strategy=standalone --test_output=all //test/cpp/end2end:cfstream_test
# kill port_server.py to prevent the build from hanging
ps aux | grep port_server\\.py | awk '{print $2}' | xargs kill -9

Loading…
Cancel
Save