Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: run tests in ubsan #3025

Merged
merged 3 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ environment:
BUILD_TYPE/tsan,tsan_clang: ThreadSanitizer
BUILD_TYPE/ubsan,ubsan_clang: UBSanitizer
NOCHECK: ""
NOCHECK/asan,tsan,ubsan,asan_clang,tsan_clang,ubsan_clang: nocheck
NOCHECK/asan,tsan,asan_clang,tsan_clang: nocheck
CTEST_OUTPUT_ON_FAILURE: 1
CCACHE_DIR: /root/.ccache
# Needed for precompiled headers (https://ccache.dev/manual/latest.html#_precompiled_headers)
Expand Down
2 changes: 1 addition & 1 deletion spread/build/ubuntu/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ execute: |
echo "OVERRIDE_CONFIGURE_OPTIONS += -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" >> debian/opts.mk

# build and run tests
debian/rules build
UBSAN_OPTIONS=halt_on_error=1 debian/rules build

ccache --show-stats --zero-stats > ${CCACHE_DIR}/ccache.stats
8 changes: 8 additions & 0 deletions tests/acceptance-tests/wayland/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ set_target_properties(

pkg_get_variable(WLCS_BINARY wlcs test_runner)

if(cmake_build_type_lower MATCHES "addresssanitizer")
set(WLCS_BINARY ${WLCS_BINARY}.asan)
elseif(cmake_build_type_lower MATCHES "threadsanitizer")
set(WLCS_BINARY ${WLCS_BINARY}.tsan)
elseif(cmake_build_type_lower MATCHES "ubsanitizer")
set(WLCS_BINARY ${WLCS_BINARY}.ubsan)
endif()

set(EXPECTED_FAILURES

ClientSurfaceEventsTest.surface_gets_enter_event
Expand Down