mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 09:12:07 +00:00
test: fix running functional tests under gdbserver
It was not possible to run the tests under the gdbserver because we were not closing the old session before starting a new one. This caused the server to not to be able to bind to the given address and crashing the tests. This commit closes the session before starting a new one. Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh2702@gmail.com>
This commit is contained in:
@@ -96,10 +96,7 @@ function module.get_session()
|
||||
return session
|
||||
end
|
||||
|
||||
function module.set_session(s, keep)
|
||||
if session and not keep then
|
||||
session:close()
|
||||
end
|
||||
function module.set_session(s)
|
||||
session = s
|
||||
end
|
||||
|
||||
@@ -366,7 +363,11 @@ local function remove_args(args, args_rm)
|
||||
return new_args
|
||||
end
|
||||
|
||||
function module.spawn(argv, merge, env)
|
||||
function module.spawn(argv, merge, env, keep)
|
||||
if session and not keep then
|
||||
session:close()
|
||||
end
|
||||
|
||||
local child_stream = ChildProcessStream.spawn(
|
||||
merge and module.merge_args(prepend_argv, argv) or argv,
|
||||
env)
|
||||
|
Reference in New Issue
Block a user