⚗️ only execute Valgrind tests

This commit is contained in:
Niels Lohmann 2021-01-26 14:09:35 +01:00
parent 8651ad47b4
commit 468dc58199
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 3 additions and 3 deletions

View File

@ -373,10 +373,9 @@ add_custom_target(ci_test_clang_sanitizer
###############################################################################
add_custom_target(ci_test_valgrind
COMMAND CXX=${GCC_TOOL} ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug -S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_valgrind -DJSON_BuildTests=ON -GNinja -DMEMORYCHECK_COMMAND=${VALGRIND_TOOL} -DMEMORYCHECK_COMMAND_OPTIONS="--error-exitcode=1 --leak-check=full"
COMMAND CXX=${GCC_TOOL} ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug -S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_valgrind -DJSON_BuildTests=ON -DJSON_Valgrind=ON -GNinja
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_valgrind
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_valgrind --target download_test_data
COMMAND cd ${PROJECT_BINARY_DIR}/build_valgrind && ${CMAKE_CTEST_COMMAND} -T memcheck -j10
COMMAND cd ${PROJECT_BINARY_DIR}/build_valgrind && ${CMAKE_CTEST_COMMAND} -L valgrind -j10
COMMENT "Compile and test with Valgrind"
)

View File

@ -173,6 +173,7 @@ foreach(file ${files})
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
set_tests_properties("${testcase}_valgrind" PROPERTIES LABELS "valgrind")
set_tests_properties("${testcase}_valgrind" PROPERTIES LABELS "all" FIXTURES_REQUIRED TEST_DATA)
endif()
endforeach()