From d3a523a74080ac7b778c36908356e5f6c1f31b8a Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 26 Feb 2024 12:57:47 -0300 Subject: tests: enable coverage on quick tests --- spec/util/quick.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spec/util/quick.lua b/spec/util/quick.lua index d7df7bb1..6b86bfa9 100644 --- a/spec/util/quick.lua +++ b/spec/util/quick.lua @@ -286,8 +286,9 @@ function quick.compile(filename, env) write([=[ local lfs = require("lfs") ]=]) write([=[ local fs = require("lfs") ]=]) write([=[ local dir_sep = package.config:sub(1, 1) ]=]) - write([=[ local luarocks_cmd = test_env.execute_helper(test_env.Q(test_env.testing_paths.lua) .. " " .. test_env.testing_paths.src_dir .. "/bin/luarocks", false, test_env.env_variables):sub(1, -5) ]=]) - write([=[ local luarocks_admin_cmd = test_env.execute_helper(test_env.Q(test_env.testing_paths.lua) .. " " .. test_env.testing_paths.src_dir .. "/bin/luarocks-admin", false, test_env.env_variables):sub(1, -5) ]=]) + write([=[ local coverage = " -e \"require('luacov.runner')([[" .. test_env.testing_paths.testrun_dir .. dir_sep .. "luacov.config]])\" " ]=]) + write([=[ local luarocks_cmd = test_env.execute_helper(test_env.Q(test_env.testing_paths.lua) .. coverage .. " " .. test_env.testing_paths.src_dir .. "/bin/luarocks", false, test_env.env_variables):sub(1, -5) ]=]) + write([=[ local luarocks_admin_cmd = test_env.execute_helper(test_env.Q(test_env.testing_paths.lua) .. coverage .. " " .. test_env.testing_paths.src_dir .. "/bin/luarocks-admin", false, test_env.env_variables):sub(1, -5) ]=]) write([=[ local function make_dir(dirname) ]=]) write([=[ local bits = {} ]=]) -- cgit v1.2.3-55-g6feb