diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/helpers.lua | 6 | ||||
-rw-r--r-- | test/functional/ui/screen.lua | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index c76979e894..ea98ff4ce3 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -6,7 +6,8 @@ local Session = require('nvim.session') local nvim_prog = os.getenv('NVIM_PROG') or 'build/bin/nvim' local nvim_argv = {nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N', - '--cmd', 'set shortmess+=I background=light', '--embed'} + '--cmd', 'set shortmess+=I background=light noswapfile', + '--embed'} local prepend_argv if os.getenv('VALGRIND') then @@ -153,8 +154,7 @@ end local function clear() if session then - session:request('vim_command', 'qa!') - session:exit() + session:exit(0) end local loop = Loop.new() local msgpack_stream = MsgpackStream.new(loop) diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index 29bbe69d8b..ef99c2a536 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -85,6 +85,10 @@ Screen.__index = Screen local debug_screen +local default_screen_timeout = 2500 +if os.getenv('VALGRIND') then + default_screen_timeout = 7500 +end function Screen.debug(command) if not command then @@ -187,12 +191,12 @@ function Screen:wait(check, timeout) end return true end - run(nil, notification_cb, nil, timeout or 5000) + run(nil, notification_cb, nil, timeout or default_screen_timeout) if not checked then err = check() end if err then - error(err) + assert(false, err) end end |