Skip to content

Commit

Permalink
fix: call in ctest (#223)
Browse files Browse the repository at this point in the history
* feat: fix prepare_cmd_for_run params in ctest

* chore:remove print

* feat: update ctest call to the new changes
  • Loading branch information
khris190 authored May 3, 2024
1 parent 7b62c7e commit f54f076
Showing 1 changed file with 11 additions and 25 deletions.
36 changes: 11 additions & 25 deletions lua/cmake-tools/test/ctest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,17 @@ function ctest.run(ctest_command, test_name, build_dir, env, config, opt)
local cmd = ctest_command
opt = opt or {}

local args = { "--test-dir", build_dir, "-R", test_name, opt.args }
if config.runner.name == "terminal" then
cmd = terminal.prepare_cmd_for_run(cmd, args, config.cwd, nil, env)
utils.run(
cmd,
config.env_script,
{},
{},
config.cwd,
config.runner,
nil,
const.cmake_notifications
)
else
utils.run(
cmd,
config.env_script,
env,
args,
config.cwd,
config.runner,
nil,
const.cmake_notifications
)
end
local args = { "--test-dir", utils.transform_path(build_dir), "-R", test_name, opt.args }
utils.run(
cmd,
config.env_script,
env,
args,
config.cwd,
config.runner,
nil,
const.cmake_notifications
)
end

return ctest

0 comments on commit f54f076

Please sign in to comment.