diff options
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 131ce7ed0b..2cf81ed4d0 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -796,6 +796,13 @@ function module.add_builddir_to_rtp() module.command(string.format([[set rtp+=%s/runtime]], module.test_build_dir)) end +-- Kill process with given pid +function module.os_kill(pid) + return os.execute((iswin() + and 'taskkill /f /t /pid '..pid..' > nul' + or 'kill -9 '..pid..' > /dev/null')) +end + module = global_helpers.tbl_extend('error', module, global_helpers) return function(after_each) |