IdeaGinkgo / Intellij-Ginkgo

Idea plugin for running and viewing ginkgo tests
GNU General Public License v3.0
34 stars 13 forks source link

Debugging tests with build tags is complicated #75

Closed trueneu closed 1 year ago

trueneu commented 1 year ago

If ginkgo tests are under a specific build tag, it only makes sense to include --tags=XXX in configuration template. However, it makes debugging at point impossible.

The reason, I guess, is the 1) applying default config flags to built ginkgo executable:

.../Goland/ch-0/223.8214.59/plugins/go-plugin/lib/dlv/linux/dlv --listen=127.0.0.1:39527 --headless=true --api-version=2 --check-go-version=false --only-same-user=false exec GINKGO_BINARY -- -ginkgo.v "-ginkgo.focus=focus test name" --tags=e2e

where --tags don't make sense anymore; and

2) the ginkgo binary built in the background is not built with tags applied, so if I try to run it, it doesn't contain any tests.

The only workaround for me currently is to temporarily remove all the build tags, from source code and config template.

TaylorOno commented 1 year ago

I think I may need to create a new parameter for tags so they can be included in the build process. If running the default go test executor do you put the build tags in tools arguments or the program arguments field? or do you just check that use all custom build tags box?

TaylorOno commented 1 year ago

if you get a chance can you give this branch a shot? https://github.com/IdeaGinkgo/Intellij-Ginkgo/tree/feature/go-tool-options tags would now go in the tool arguments field

trueneu commented 1 year ago

Sorry for the delay and thanks for the fix, I'll test it in the upcoming days.