diff --git a/.gitlab/ci/centos8.yml b/.gitlab/ci/centos8.yml index a5b5b9266..eb3266aa3 100644 --- a/.gitlab/ci/centos8.yml +++ b/.gitlab/ci/centos8.yml @@ -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 diff --git a/.gitlab/ci/ctest_memcheck.cmake b/.gitlab/ci/ctest_memcheck.cmake index 944c829b7..529a57817 100644 --- a/.gitlab/ci/ctest_memcheck.cmake +++ b/.gitlab/ci/ctest_memcheck.cmake @@ -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 () diff --git a/.gitlab/ci/rhel8.yml b/.gitlab/ci/rhel8.yml index 8c29eb195..5ae77381b 100644 --- a/.gitlab/ci/rhel8.yml +++ b/.gitlab/ci/rhel8.yml @@ -29,4 +29,3 @@ test:rhel8: - build:rhel8 needs: - build:rhel8 -