[folks] Add support for running tests under callgrind as well as memcheck
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Add support for running tests under callgrind as well as memcheck
- Date: Wed, 20 Mar 2013 13:54:24 +0000 (UTC)
commit 3ea5bb8367c9dc138090213ab3edcbedf97b87a8
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Wed Mar 20 13:41:23 2013 +0000
Add support for running tests under callgrind as well as memcheck
Bug https://bugzilla.gnome.org/show_bug.cgi?id=696104
Reviewed-by: Philip Withnall <philip tecnocode co uk>
[... and document it in HACKING in response to review -smcv]
Signed-off-by: Simon McVittie <simon mcvittie collabora co uk>
HACKING | 3 +++
tests/eds/Makefile.am | 1 +
valgrind.mk | 7 +++++++
3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/HACKING b/HACKING
index 263e548..b2f57ab 100644
--- a/HACKING
+++ b/HACKING
@@ -160,6 +160,9 @@ To run a single test with debugging output:
If a test needs to be run through Valgrind for memory debugging, use:
make -C tests/<dir> check TESTS=<test name> FOLKS_TEST_VALGRIND=1
+If a test needs to be run through Callgrind for performance profiling, use:
+ make -C tests/<dir> check TESTS=<test name> FOLKS_TEST_CALLGRIND=1
+
Profiling folks
===============
diff --git a/tests/eds/Makefile.am b/tests/eds/Makefile.am
index 6cef4ae..bf22cea 100644
--- a/tests/eds/Makefile.am
+++ b/tests/eds/Makefile.am
@@ -238,3 +238,4 @@ EXTRA_DIST = \
-include $(top_srcdir)/git.mk
-include $(top_srcdir)/check.mk
+-include $(top_srcdir)/valgrind.mk
diff --git a/valgrind.mk b/valgrind.mk
index 7876046..ece2f84 100644
--- a/valgrind.mk
+++ b/valgrind.mk
@@ -1,5 +1,12 @@
# Pass FOLKS_TEST_VALGRIND=1 to make to enable Valgrind on the tests
# This file must be included _after_ TESTS_ENVIRONMENT has been set by the Makefile.am.
+
+ifeq ($(FOLKS_TEST_CALLGRIND),1)
+TESTS_ENVIRONMENT := \
+ $(TESTS_ENVIRONMENT) \
+ $(LIBTOOL) --mode=execute valgrind --tool=callgrind
+endif
+
ifeq ($(FOLKS_TEST_VALGRIND),1)
TESTS_ENVIRONMENT := \
G_DEBUG=$(G_DEBUG),gc-friendly \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]