aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-05-26 13:39:17 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-05-26 14:02:12 -0300
commita80a68c92747144f0094368ae01c0cb23095433c (patch)
treed39163f5f27ad6ddf116e0c22bee667099a75ba6
parentd6291894d48c2ae558a603a2207c52833ce10f01 (diff)
downloadrneovim-a80a68c92747144f0094368ae01c0cb23095433c.tar.gz
rneovim-a80a68c92747144f0094368ae01c0cb23095433c.tar.bz2
rneovim-a80a68c92747144f0094368ae01c0cb23095433c.zip
Build: Enable valgrind's --leak-check when testing the API
-rw-r--r--.valgrind.supp25
-rwxr-xr-xscripts/travis.sh3
2 files changed, 27 insertions, 1 deletions
diff --git a/.valgrind.supp b/.valgrind.supp
index a0a96518ba..f788030151 100644
--- a/.valgrind.supp
+++ b/.valgrind.supp
@@ -5,3 +5,28 @@
fun:nss_parse_service_list
fun:__nss_database_lookup
}
+{
+ ex_function_1
+ Memcheck:Leak
+ fun:malloc
+ fun:try_malloc
+ fun:xmalloc
+ fun:ex_function
+}
+{
+ ex_function_2
+ Memcheck:Leak
+ fun:realloc
+ fun:xrealloc
+ fun:ga_grow
+ fun:ex_function
+}
+{
+ ex_function_3
+ Memcheck:Leak
+ fun:malloc
+ fun:strdup
+ fun:xstrdup
+ fun:vim_strsave
+ fun:ex_function
+}
diff --git a/scripts/travis.sh b/scripts/travis.sh
index 3daa2652e5..2b97773b22 100755
--- a/scripts/travis.sh
+++ b/scripts/travis.sh
@@ -3,6 +3,7 @@
tmpdir="$(pwd)/tmp"
rm -rf "$tmpdir"
mkdir -p "$tmpdir"
+suppressions="$(pwd)/.valgrind.supp"
valgrind_check() {
(
@@ -171,7 +172,7 @@ elif [ "$TRAVIS_BUILD_TYPE" = "api/python" ]; then
sudo pip install .
sudo pip install nose
test_cmd="nosetests --verbosity=2"
- nvim_cmd="valgrind -q --track-origins=yes --log-file=$tmpdir/valgrind-%p.log ../build/bin/nvim -u NONE"
+ nvim_cmd="valgrind -q --track-origins=yes --leak-check=yes --suppressions=$suppressions --log-file=$tmpdir/valgrind-%p.log ../build/bin/nvim -u NONE"
if ! ../scripts/run-api-tests.exp "$test_cmd" "$nvim_cmd"; then
valgrind_check "$tmpdir"
exit 1