use clang for C++ debug testing (#18343)

This commit is contained in:
Chen Shen 2021-09-09 15:48:36 -07:00 committed by GitHub
parent d3d8120db3
commit 5f57079041
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions

View file

@ -94,6 +94,9 @@ build:asan --copt -fno-omit-frame-pointer
build:asan --linkopt -fsanitize=address build:asan --linkopt -fsanitize=address
test:asan --jobs=1 test:asan --jobs=1
test:asan --test_env=ASAN_OPTIONS="detect_leaks=0" test:asan --test_env=ASAN_OPTIONS="detect_leaks=0"
# https://github.com/google/sanitizers/issues/1017
build:asan-clang --copt -mllvm
build:asan-clang --copt -asan-use-private-alias=1
build:asan-build --strip=never build:asan-build --strip=never
build:asan-build -c dbg build:asan-build -c dbg

View file

@ -37,6 +37,7 @@ RUN apt-get install -y -qq \
RUN ln -s /usr/bin/clang-format-7 /usr/bin/clang-format && \ RUN ln -s /usr/bin/clang-format-7 /usr/bin/clang-format && \
ln -s /usr/bin/clang-tidy-12 /usr/bin/clang-tidy && \ ln -s /usr/bin/clang-tidy-12 /usr/bin/clang-tidy && \
ln -s /usr/bin/clang-12 /usr/bin/clang ln -s /usr/bin/clang-12 /usr/bin/clang
RUN curl -o- https://get.docker.com | sh RUN curl -o- https://get.docker.com | sh
# System conf for tests # System conf for tests

View file

@ -135,7 +135,7 @@
- label: ":cpp: Tests" - label: ":cpp: Tests"
commands: commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
- bazel test --config=ci $(./scripts/bazel_export_options) - CC=clang bazel test --config=ci $(./scripts/bazel_export_options)
--build_tests_only --build_tests_only
--test_tag_filters=-flaky --test_tag_filters=-flaky
-- //:all -rllib/... -core_worker_test -- //:all -rllib/... -core_worker_test
@ -143,9 +143,8 @@
- label: ":cpp: Tests (ASAN)" - label: ":cpp: Tests (ASAN)"
commands: commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
- bazel test --config=ci --config=asan $(./scripts/bazel_export_options) - CC=clang bazel test --config=ci --config=asan --config=asan-clang $(./scripts/bazel_export_options)
--build_tests_only --build_tests_only
--config=asan-buildkite
--jobs=2 --jobs=2
--test_tag_filters=-flaky --test_tag_filters=-flaky
-- //:all -//:core_worker_test -- //:all -//:core_worker_test
@ -162,7 +161,7 @@
- label: ":cpp: Tests (TSAN)" - label: ":cpp: Tests (TSAN)"
commands: commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT - cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/travis/upload_build_info.sh; fi }; trap cleanup EXIT
- bazel test --config=ci --config=tsan $(./scripts/bazel_export_options) - CC=clang bazel test --config=ci --config=tsan $(./scripts/bazel_export_options)
--build_tests_only --build_tests_only
--jobs=2 --jobs=2
--test_tag_filters=-flaky --test_tag_filters=-flaky

View file

@ -159,6 +159,7 @@ struct ObjectStatsCollectorTest : public Test {
ray::ObjectInfo info; ray::ObjectInfo info;
info.object_id = id; info.object_id = id;
info.data_size = data_size; info.data_size = data_size;
info.metadata_size = 0;
return info; return info;
} }