Skip to content

Commit 3d74701

Browse files
committed
Added ability to run tests through memcheck.
1 parent cdb8f43 commit 3d74701

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

CTestConfig.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
set(MEMORYCHECK_COMMAND_OPTIONS "--tool=memcheck --partial-loads-ok=yes --error-limit=no --leak-check=full --show-reachable=yes --max-stackframe=16777216 --num-callers=20 --child-silent-after-fork=yes --track-origins=yes --error-exitcode=1 --errors-for-leak-kinds=all")
2+
3+
set(MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_CURRENT_LIST_DIR}/scripts/valgrind.supp")

scripts/valgrind.supp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,22 @@
33
# See https://wiki.wxwidgets.org/Valgrind_Suppression_File_Howto
44
# Some of these are included in the default suppression file on LC. If you
55
# believe they are hiding real errors you can disable the default suppressions
6-
# with --default-suppressions=no (not reccomended).
6+
# with --default-suppressions=no (not recommended).
77
################################################################################
88

9+
################################################################################
10+
# LvArray
11+
################################################################################
12+
{
13+
Static chai::ArrayManager leak
14+
Memcheck:Leak
15+
match-leak-kinds: reachable
16+
fun:_Znwm
17+
fun:_ZN4chai12ArrayManagerC1Ev
18+
fun:_ZN4chai12ArrayManager11getInstanceEv
19+
...
20+
}
21+
922
################################################################################
1023
# mpi suppressions
1124
################################################################################

0 commit comments

Comments
 (0)