mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
vim-patch:8.2.5145: exit test causes spurious valgrind reports
Problem: Exit test causes spurious valgrind reports.
Solution: Skip test. Add CheckNotValgrind.
cf801d4b95
Cherry-pick RunningWithValgrind() from patch 8.2.5136.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -171,6 +171,14 @@ func CheckNotAsan()
|
|||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" Command to check for not running under valgrind
|
||||||
|
command CheckNotValgrind call CheckNotValgrind()
|
||||||
|
func CheckNotValgrind()
|
||||||
|
if RunningWithValgrind()
|
||||||
|
throw 'Skipped: does not work well with valgrind'
|
||||||
|
endif
|
||||||
|
endfunc
|
||||||
|
|
||||||
" Command to check for X11 based GUI
|
" Command to check for X11 based GUI
|
||||||
command CheckX11BasedGui call CheckX11BasedGui()
|
command CheckX11BasedGui call CheckX11BasedGui()
|
||||||
func CheckX11BasedGui()
|
func CheckX11BasedGui()
|
||||||
|
@@ -285,6 +285,12 @@ func GetVimCommand(...)
|
|||||||
return cmd
|
return cmd
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" Return one when it looks like the tests are run with valgrind, which means
|
||||||
|
" that everything is much slower.
|
||||||
|
func RunningWithValgrind()
|
||||||
|
return GetVimCommand() =~ '\<valgrind\>'
|
||||||
|
endfunc
|
||||||
|
|
||||||
" Get the command to run Vim, with --clean instead of "-u NONE".
|
" Get the command to run Vim, with --clean instead of "-u NONE".
|
||||||
func GetVimCommandClean()
|
func GetVimCommandClean()
|
||||||
let cmd = GetVimCommand()
|
let cmd = GetVimCommand()
|
||||||
|
@@ -117,6 +117,7 @@ func Test_exit_error_reading_input()
|
|||||||
CheckNotMSWindows
|
CheckNotMSWindows
|
||||||
" The early exit causes memory not to be freed somehow
|
" The early exit causes memory not to be freed somehow
|
||||||
CheckNotAsan
|
CheckNotAsan
|
||||||
|
CheckNotValgrind
|
||||||
|
|
||||||
call writefile([":au VimLeave * call writefile(['l = ' .. v:exiting], 'Xtestout')", ":tabnew", "q:"], 'Xscript', 'b')
|
call writefile([":au VimLeave * call writefile(['l = ' .. v:exiting], 'Xtestout')", ":tabnew", "q:"], 'Xscript', 'b')
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user