Replies: 1 comment
-
I looked into this a bit more and I think the current way neotest is doing this is to walk the file tree downward. It would be nice to get a hook/api into neotest to customize the tree walk. That way, I can use Bazel query to discover the test targets instead of having to walk the file tree with neotest. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on neotest-bazel and our test hierarchy is a bit different than a typical file-based setup.
Each Bazel's
package
(directory) could contain multiple testtargets
.Each target could be using different files to group up a test, or the same files but with different parameters.
So what does this translate to is that an example setup like this is possible:
//foo
and 2 test targets//foo:bar
and//foo:baz
.//foo:bar
and//foo:baz
use source file//foo:foo_test.go
, but build and run it with different flags.foo_test.go
, there could be multiple tests:TestA
,TestB
and sub-testsTestC/with_X
,TestC/with_Y
.What is unclear to me is how to tell Neotest about
:bar
and:baz
?Initially, I thought that I could modify
build_position
to return multipleneotest.Position[]
, each with the same test but with an added target prefix toname
. But that did not work at all.Do I have to construct a parent tree in
discover_positions
forbar
andbaz
? 🤔Beta Was this translation helpful? Give feedback.
All reactions