tests: Setup Leak Sanitizer suppressions for OpenSSL

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
(cherry picked from commit 21ef488121)
This commit is contained in:
Andreas Schneider
2022-07-08 11:10:39 +02:00
parent b9ccaf6e23
commit 3107133d10
3 changed files with 10 additions and 0 deletions

View File

@@ -101,6 +101,10 @@ foreach(_UNIT_TEST ${LIBSSH_UNIT_TESTS})
COMPILE_OPTIONS ${DEFAULT_C_COMPILE_FLAGS}
LINK_LIBRARIES ${TEST_TARGET_LIBRARIES}
)
set_property(TEST ${_UNIT_TEST}
PROPERTY
ENVIRONMENT LSAN_OPTIONS=suppressions=${libssh-tests_SOURCE_DIR}/suppressions/lsan.supp)
endforeach()
if (CMAKE_USE_PTHREADS_INIT)
@@ -110,6 +114,10 @@ if (CMAKE_USE_PTHREADS_INIT)
COMPILE_OPTIONS ${DEFAULT_C_COMPILE_FLAGS}
LINK_LIBRARIES ${TEST_TARGET_LIBRARIES} Threads::Threads
)
set_property(TEST ${_UNIT_TEST}
PROPERTY
ENVIRONMENT LSAN_OPTIONS=suppressions=${libssh-tests_SOURCE_DIR}/suppressions/lsan.supp)
endforeach()
endif ()