From: Luiz Augusto von Dentz <redacted>
This add a call to VALGRIND_DO_ADDED_LEAK_CHECK at the end of each test.
---
src/shared/tester.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/shared/tester.c b/src/shared/tester.c
index 30857e0..c3120fb 100644
--- a/src/shared/tester.c
+++ b/src/shared/tester.c
@@ -35,6 +35,10 @@
#include <glib.h>
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+#include <valgrind/memcheck.h>
+#endif
+
#include "src/shared/util.h"
#include "src/shared/tester.h"
@@ -339,6 +343,10 @@ static gboolean teardown_callback(gpointer user_data)
print_progress(test->name, COLOR_MAGENTA, "teardown");
test->teardown_func(test->test_data);
+#ifdef HAVE_VALGRIND_MEMCHECK_H
+ VALGRIND_DO_ADDED_LEAK_CHECK;
+#endif
+
return FALSE;
}
--
2.4.3