Add lsan suppression file

This commit is contained in:
Robert Maynard 2020-04-20 12:15:08 -04:00
parent b3924ef302
commit 07f37c814b
3 changed files with 12 additions and 22 deletions

@ -16,7 +16,7 @@ build:centos8_sanitizer:
CMAKE_GENERATOR: "Unix Makefiles"
VTKM_SETTINGS: "serial+shared+asan+leak"
test:centos8_asan:
test:centos8_sanitizer:
tags:
- test
- vtkm
@ -33,21 +33,3 @@ test:centos8_asan:
- build:centos8_sanitizer
needs:
- build:centos8_sanitizer
test:centos8_leak:
tags:
- test
- vtkm
- docker
- linux
- privileged
extends:
- .centos8
- .cmake_memcheck_linux
- .only-default
variables:
CTEST_MEMORYCHECK_TYPE: AddressSanitizer
dependencies:
- build:centos8_sanitizer
needs:
- build:centos8_sanitizer

@ -26,6 +26,11 @@ if(NOT CTEST_MEMORYCHECK_SANITIZER_OPTIONS)
set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS "$ENV{CTEST_MEMORYCHECK_SANITIZER_OPTIONS}")
endif()
if(NOT CTEST_MEMORYCHECK_SUPPRESSIONS_FILE)
if(CTEST_MEMORYCHECK_TYPE STREQUAL "LeakSanitizer")
set(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "${CTEST_SOURCE_DIRECTORY}/CMake/testing/lsan.supp")
endif()
endif()
set(test_exclusions
# placeholder for tests to exclude
@ -46,6 +51,10 @@ ctest_memcheck(
ctest_submit(PARTS Memcheck)
if (defects)
message(FATAL_ERROR
"Found ${defects} memcheck defects")
message(FATAL_ERROR "Found ${defects} memcheck defects")
endif ()
if (test_result)
message(FATAL_ERROR "Failed to test")
endif ()

@ -29,4 +29,3 @@ test:rhel8:
- build:rhel8
needs:
- build:rhel8