Commit 064ee42d99f1c457fcf728df728c0fb7ea65bc07

Carlos Martín Nieto 2012-09-04T15:54:33

travis: use a valgrind suppressions file We don't care about the supposed zlib errors, and the leak from giterr_set isn't interesting, as it gets freed each time an error is set. Give valgrind a suppressions file so it doesn't tell us about them.

diff --git a/.travis.yml b/.travis.yml
index 29ef9d4..54da48a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,7 +32,7 @@ script:
 # Run Tests
 after_script:
  - ctest -V .
- - if [ -f ./libgit2_clar ]; then valgrind --leak-check=full --show-reachable=yes ./libgit2_clar; else echo "Skipping valgrind"; fi
+ - if [ -f ./libgit2_clar ]; then valgrind --leak-check=full --show-reachable=yes --suppressions=../libgit2_clar.supp ./libgit2_clar; else echo "Skipping valgrind"; fi
 
 # Only watch the development branch
 branches:
diff --git a/libgit2_clar.supp b/libgit2_clar.supp
new file mode 100644
index 0000000..f49eb00
--- /dev/null
+++ b/libgit2_clar.supp
@@ -0,0 +1,12 @@
+{
+        ignore-zlib-errors-cond
+        Memcheck:Cond
+        obj:*libz.so*
+}
+
+{
+        ignore-giterr-set-leak
+        Memcheck:Leak
+        ...
+        fun:giterr_set
+}