From 1275f1d78653c2286e8b1a614d07e3149277383c Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sun, 31 Jul 2022 23:21:29 -0300 Subject: luarocks test: check all dependency kinds When running tests we usually need runtime, build and test dependencies. This avoid having CI setups need to run `luarocks make --only-deps` in order to run `luarocks test`. --- src/luarocks/test.lua | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/luarocks/test.lua b/src/luarocks/test.lua index ef801a9d..23ce3b59 100644 --- a/src/luarocks/test.lua +++ b/src/luarocks/test.lua @@ -56,10 +56,17 @@ function test.run_test_suite(rockspec_arg, test_type, args, prepare) end assert(test_type) - if next(rockspec.test_dependencies) then - local ok, err, errcode = deps.fulfill_dependencies(rockspec, "test_dependencies", "all") - if err then - return nil, err, errcode + local all_deps = { + "dependencies", + "build_dependencies", + "test_dependencies", + } + for _, dep_kind in ipairs(all_deps) do + if next(rockspec[dep_kind]) then + local ok, err, errcode = deps.fulfill_dependencies(rockspec, dep_kind, "all") + if err then + return nil, err, errcode + end end end -- cgit v1.2.3-55-g6feb