From 9ae6b03e7aaf635da5d39c1bd7ff6829cc232acb Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 5 Dec 2022 09:53:31 +0800 Subject: vim-patch:8.2.5145: exit test causes spurious valgrind reports Problem: Exit test causes spurious valgrind reports. Solution: Skip test. Add CheckNotValgrind. https://github.com/vim/vim/commit/cf801d4b95180ddaee1bf633ef482232625dd80b Cherry-pick RunningWithValgrind() from patch 8.2.5136. Co-authored-by: Bram Moolenaar --- src/nvim/testdir/shared.vim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/nvim/testdir/shared.vim') diff --git a/src/nvim/testdir/shared.vim b/src/nvim/testdir/shared.vim index ef7cc4ac5f..953118f650 100644 --- a/src/nvim/testdir/shared.vim +++ b/src/nvim/testdir/shared.vim @@ -285,6 +285,12 @@ func GetVimCommand(...) return cmd endfunc +" Return one when it looks like the tests are run with valgrind, which means +" that everything is much slower. +func RunningWithValgrind() + return GetVimCommand() =~ '\' +endfunc + " Get the command to run Vim, with --clean instead of "-u NONE". func GetVimCommandClean() let cmd = GetVimCommand() -- cgit