summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2013-10-06 16:41:37 -0700
committerSimon Feltman <sfeltman@src.gnome.org>2013-10-06 18:55:41 -0700
commit62f185bef20b42f18290a3cf1d3b19dddc957f8a (patch)
tree9d2e58ba930714c5ac86d87bc0509026a649d3c1
parent314c933626c4dc5fc585d0e5b6c45ddb17c2e52f (diff)
downloadpygobject-62f185bef20b42f18290a3cf1d3b19dddc957f8a.tar.gz
tests: Update check.valgrind with always-malloc and add logging options
Based on notes in https://wiki.gnome.org/Valgrind we need to use always-malloc for valgrind runs. Add check.valgrindlog and check.valgrindxml which output valgrind logs into an ignored local tmp. Output logs are named <head-sha>-$TEST_NAMES.log so we can track commits and use diff tools on the logs.
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am6
-rw-r--r--tests/Makefile.am10
3 files changed, 16 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index de5c0fcb..a2307e6e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -65,3 +65,4 @@ Makefile.in
/stamp-h1
/tags
/xmldocs.make
+/tmp/*
diff --git a/Makefile.am b/Makefile.am
index 5e910245..5051b54c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -148,4 +148,10 @@ check.nemiver:
check.valgrind:
cd tests && $(MAKE) check.valgrind
+check.valgrindlog:
+ cd tests && $(MAKE) check.valgrindlog
+
+check.valgrindxml:
+ cd tests && $(MAKE) check.valgrindxml
+
@GNOME_CODE_COVERAGE_RULES@
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 899242aa..a7b03237 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -153,4 +153,12 @@ check.nemiver:
EXEC_NAME="nemiver" $(MAKE) check
check.valgrind:
- EXEC_NAME="valgrind --leak-check=full --show-possibly-lost=no --suppressions=python.supp" G_DEBUG=gc-friendly $(MAKE) check
+ EXEC_NAME="G_SLICE=always-malloc valgrind --leak-check=full --show-possibly-lost=no --suppressions=python.supp" G_DEBUG=gc-friendly $(MAKE) check
+
+check.valgrindlog:
+ mkdir -p $(top_builddir)/tmp
+ EXEC_NAME="G_SLICE=always-malloc valgrind --log-file=$(top_builddir)/tmp/`git rev-parse HEAD | cut -c1-8`-$$TEST_NAMES.log --leak-check=full --show-possibly-lost=no --suppressions=python.supp" G_DEBUG=gc-friendly $(MAKE) check
+
+check.valgrindxml:
+ mkdir -p $(top_builddir)/tmp
+ EXEC_NAME="G_SLICE=always-malloc valgrind --xml=yes --xml-file=$(top_builddir)/tmp/`git rev-parse HEAD | cut -c1-8`-$$TEST_NAMES.xml --leak-check=full --show-possibly-lost=no --suppressions=python.supp" G_DEBUG=gc-friendly $(MAKE) check