diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2022-07-31 23:21:29 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2022-08-26 11:53:15 -0300 |
commit | 1275f1d78653c2286e8b1a614d07e3149277383c (patch) | |
tree | 180d86b63fe27cf39a8bb72e061bb31dabf8448f /src | |
parent | 6ea9a85d6589a6c890ff0e136ab88703567aa983 (diff) | |
download | luarocks-1275f1d78653c2286e8b1a614d07e3149277383c.tar.gz luarocks-1275f1d78653c2286e8b1a614d07e3149277383c.tar.bz2 luarocks-1275f1d78653c2286e8b1a614d07e3149277383c.zip |
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`.
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/test.lua | 15 |
1 files changed, 11 insertions, 4 deletions
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) | |||
56 | end | 56 | end |
57 | assert(test_type) | 57 | assert(test_type) |
58 | 58 | ||
59 | if next(rockspec.test_dependencies) then | 59 | local all_deps = { |
60 | local ok, err, errcode = deps.fulfill_dependencies(rockspec, "test_dependencies", "all") | 60 | "dependencies", |
61 | if err then | 61 | "build_dependencies", |
62 | return nil, err, errcode | 62 | "test_dependencies", |
63 | } | ||
64 | for _, dep_kind in ipairs(all_deps) do | ||
65 | if next(rockspec[dep_kind]) then | ||
66 | local ok, err, errcode = deps.fulfill_dependencies(rockspec, dep_kind, "all") | ||
67 | if err then | ||
68 | return nil, err, errcode | ||
69 | end | ||
63 | end | 70 | end |
64 | end | 71 | end |
65 | 72 | ||