tests: Set the valgrind suppression file
authorAndreas Schneider <asn@samba.org>
Fri, 20 Nov 2015 08:59:58 +0000 (09:59 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 20 Nov 2015 10:06:35 +0000 (11:06 +0100)
You can run 'make ExperimentalMemcheck' with valgrind suppression now.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
CMakeLists.txt

index f73a46c188a3f502e89ef3caf807dedd2d474a95..c23802e6295cdb8563ed8275accbd8b6712ca3b2 100644 (file)
@@ -58,6 +58,15 @@ install(
 
 if (UNIT_TESTING)
     find_package(CMocka REQUIRED)
+
+    file(TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}/tests/valgrind.supp" VALGRIND_SUPPRESSION_FILE)
+    # add the valgrind suppressions
+    set(MEMORYCHECK_SUPPRESSIONS_FILE
+        ${VALGRIND_SUPPRESSION_FILE}
+        CACHE
+        FILEPATH
+        "Path to the memory checking command, used for memory error detection.")
+
     include(AddCMockaTest)
     add_subdirectory(tests)
 endif (UNIT_TESTING)