diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-05-21 20:57:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-21 20:57:39 +0200 |
commit | 8b8e60728486e1fbb308bee2961175be355e550a (patch) | |
tree | 878a80ccf7a2453d16b4030aacd1f60fe503cb41 /test/busted_runner.lua | |
parent | 384a3bc308c95c9511eff1b85cd55357bdaedd9e (diff) | |
download | rneovim-8b8e60728486e1fbb308bee2961175be355e550a.tar.gz rneovim-8b8e60728486e1fbb308bee2961175be355e550a.tar.bz2 rneovim-8b8e60728486e1fbb308bee2961175be355e550a.zip |
build: move luarocks and rocks installation to main build
This will ensure luacheck and busted are only installed when they're
actually needed. This cuts total build time by over 50%.
Closes https://github.com/neovim/neovim/issues/22797.
Diffstat (limited to 'test/busted_runner.lua')
-rw-r--r-- | test/busted_runner.lua | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/test/busted_runner.lua b/test/busted_runner.lua index 62d1e611e7..5604790069 100644 --- a/test/busted_runner.lua +++ b/test/busted_runner.lua @@ -1,12 +1,7 @@ local platform = vim.loop.os_uname() -if platform and platform.sysname:lower():find'windows' then - local deps_prefix = os.getenv 'DEPS_PREFIX' - if deps_prefix ~= nil and deps_prefix ~= "" then - package.path = deps_prefix.."/share/lua/5.1/?.lua;"..deps_prefix.."/share/lua/5.1/?/init.lua;"..package.path - package.path = deps_prefix.."/bin/lua/?.lua;"..deps_prefix.."/bin/lua/?/init.lua;"..package.path - package.cpath = deps_prefix.."/lib/lua/5.1/?.dll;"..package.cpath; - package.cpath = deps_prefix.."/bin/?.dll;"..deps_prefix.."/bin/loadall.dll;"..package.cpath; - end -end +local deps_install_dir = os.getenv 'DEPS_INSTALL_DIR' +local suffix = (platform and platform.sysname:lower():find'windows') and '.dll' or '.so' +package.path = deps_install_dir.."/share/lua/5.1/?.lua;"..deps_install_dir.."/share/lua/5.1/?/init.lua;"..package.path +package.cpath = deps_install_dir.."/lib/lua/5.1/?"..suffix..";"..package.cpath; require 'busted.runner'({ standalone = false }) |