Closed pcorbineau closed 4 months ago
As a temporary solution I removed this line.
diff --git a/lua/neotest-ctest/init.lua b/lua/neotest-ctest/init.lua
index d7226b8..205f28c 100644
--- a/lua/neotest-ctest/init.lua
+++ b/lua/neotest-ctest/init.lua
@@ -62,11 +62,9 @@ function adapter.build_spec(args)
-- NOTE: The '-I Start,End,Stride,test#,test#,...' option runs the specified tests in the
-- range starting from number Start, ending at number End, incremented by number Stride.
-- If Start, End and Stride are set to 0, then CTest will run all test# as specified.
- local filter = string.format("-I 0,0,0,%s", table.concat(runnable_tests, ","))
local extra_args = config.extra_args or {}
vim.list_extend(extra_args, args.extra_args or {})
- local ctest_args = { filter, table.concat(extra_args, " ") }
local command = ctest:command(ctest_args)
local framework = require("neotest-ctest.framework").detect(position.path)
@@ -78,6 +76,8 @@ function adapter.build_spec(args)
framework = framework,
},
}
+ -- local filter = string.format("-I 0,0,0,%s", table.concat(runnable_tests, ","))
+ local ctest_args = { table.concat(extra_args, " ") }
end
local function prepare_results(tree, testsuite, framework)
Hi. Could you have a look at my comment in #24? I think this issue is related to the fix you provided in #24. If this is the case, then we can close this issue. Removing the --tests-information
option shouldn't be necessary as long as ctest
is running in the right build/binary tree.
FYI, this command: ctest --test-dir D:\personal\workspace\test-sandbox\build\Debug -I 0,0,0,
won't run any tests because it doesn't specify any test numbers/indexes to run.
I'm pretty sure you would see a different result if you run: ctest --test-dir D:\personal\workspace\test-sandbox\build\Debug -I 0,0,0,1,2
(which is the filter that neotest-ctest
should have produced if it found runnable tests to execute).
Should be fixed as part of #24 now.
on my setup, Windows : 11 cmake : 3.28 neovim : 0.10.0
I found that line :
local filter = string.format("-I 0,0,0,%s", table.concat(runnable_tests, ","))
produces an error from command line.
Indeed, If i test the command produces ( I remove the output args) ,I got :
if I remove the -I option it works :