mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 02:08:17 +00:00
Build: Enable valgrind's --leak-check when testing the API
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user