summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2020-02-12 10:56:13 +0100
committerAndreas Schneider <asn@samba.org>2021-01-29 08:42:31 +0100
commitc0fb86a71418dc8610089434fda4effbc99b4c12 (patch)
tree6206638d81d8672b01976813e5c88e0d343fb5ce /tests
parent06e423d0647c4a3915f8600c8ec7c8825f8f1e97 (diff)
downloadsocket_wrapper-c0fb86a71418dc8610089434fda4effbc99b4c12.tar.gz
socket_wrapper-c0fb86a71418dc8610089434fda4effbc99b4c12.tar.xz
socket_wrapper-c0fb86a71418dc8610089434fda4effbc99b4c12.zip
gitlab-ci: Add job for ThreadSanitizer
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 46a81c9..72cda71 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -92,6 +92,15 @@ function(ADD_CMOCKA_TEST_ENVIRONMENT _TEST_NAME)
set(TORTURE_ENVIRONMENT "LD_PRELOAD=${_TMP_ENV}")
endif()
+ if (CMAKE_BUILD_TYPE)
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
+ if (CMAKE_BUILD_TYPE_LOWER STREQUAL "addresssanitizer" OR
+ CMAKE_BUILD_TYPE_LOWER STREQUAL "threadsanitizer" OR
+ CMAKE_BUILD_TYPE_LOWER STREQUAL "undefinedsanitizer")
+ list(APPEND TORTURE_ENVIRONMENT "SOCKET_WRAPPER_DISABLE_DEEPBIND=1")
+ endif()
+ endif()
+
set_property(TEST
${_TEST_NAME}
PROPERTY