Skip to content
Snippets Groups Projects
Commit 68afb492 authored by Richard W.M. Jones's avatar Richard W.M. Jones Committed by Milo Yip
Browse files

tests: Only run valgrind tests if valgrind was found


valgrind is not present on all architectures (eg riscv64) and might
not be installed even on supported architectures.

Signed-off-by: default avatarRichard W.M. Jones <rjones@redhat.com>
parent 3f73edae
Branches
No related tags found
No related merge requests found
......@@ -66,6 +66,8 @@ if(CCACHE_FOUND)
endif()
endif(CCACHE_FOUND)
find_program(VALGRIND_FOUND valgrind)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(RAPIDJSON_ENABLE_INSTRUMENTATION_OPT AND NOT CMAKE_CROSSCOMPILING)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "powerpc" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le")
......
......@@ -80,7 +80,7 @@ add_test(NAME unittest
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
if(NOT MSVC)
if(NOT MSVC AND VALGRIND_FOUND)
# Not running SIMD.* unit test cases for Valgrind
add_test(NAME valgrind_unittest
COMMAND valgrind --suppressions=${CMAKE_SOURCE_DIR}/test/valgrind.supp --leak-check=full --error-exitcode=1 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest --gtest_filter=-SIMD.*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment