aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index a26e883370..f152a487af 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -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)