Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove valgrind warning on windows #768

Merged
merged 3 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ enable_testing()
# Create helper method which adds a valgrind test with the given binary
function(add_valgrind_test NAME_WITH_PREFIX BINARY WORKING_DIRECTORY)
if("${MEMORYCHECK_COMMAND}" STREQUAL "MEMORYCHECK_COMMAND-NOTFOUND")
MESSAGE(STATUS "valgrind not found. Please install it")
if (NOT WIN32)
MESSAGE(STATUS "valgrind not found. Please install it")
endif()
else()
add_test(NAME ${NAME_WITH_PREFIX}_valgrind
COMMAND ${MEMORYCHECK_COMMAND} ${MEMORYCHECK_COMMAND_OPTIONS} --suppressions=${MEMORYCHECK_SUPPRESSIONS_FILE} --gen-suppressions=all ${BINARY}
Expand Down
12 changes: 7 additions & 5 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ function(add_acceptance_tests TEST_NAME)
${CPP_TEST_NAME} PROPERTIES ENVIRONMENT_MODIFICATION "${RUNTIME_ENV}"
)

# Add valgrind test
add_valgrind_test(
${NAME_WITH_PREFIX} $<TARGET_FILE:${TARGET_NAME}>
${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}
)
if (NOT WIN32)
# Add valgrind test
add_valgrind_test(
${NAME_WITH_PREFIX} $<TARGET_FILE:${TARGET_NAME}>
${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}
)
endif()
endfunction()

# Add tests for all the acceptance tests
Expand Down
Loading