"No tests were found" in test display, when running from a go project, within a bazel overall workspace
Description of the bug:
I'm still getting the situation described in #6427, and supposedly fixed in #6634.
I'm using 2024..3.3 uptimate edition, with bazel plugin 2025.01.21.0.2-api-version-243, with the go plugin.
My particular structure involves go in a sub-package of the root, the whole project isn't go.
/MODULE.bazel /kotlin/... /rust/... /golang/Build.bazel /golang/go.mod /golang/brackets/Build.bazel /golang/brackets/brackets.go /golang/brackets/brackets_test.go
I have tried two separate approaches. One without explicitly setting /golang as a Sources directory, in which I get all the bazel test verbiage as expected (whether the test is set to fail or pass). I have also explicitly set /golang as a Sources root, so that some go IDE features work nicer. I can then run the go test command more directly, and that also works fine, in the test output, as expected.
In either case, I get "No tests were found" in the sidebar.
I conjecture that the fact that my go project is rooted slightly deeper in the tree, it may put the output files in a place the IJ plugin can't find them, so thinks there are no test outputs.
Which category does this issue belong to?
Intellij
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Import this project at the given commit (https://github.com/cgruber/brackets/commit/c1d1771815965eba42f71b2fd15ec235de3dc7d4) and go to the /golang/brackets package, right click and do the Run the 'bazel test //golang/... menu option. You should see the normal bazel test output (with a failing test) in the test output window, and you should see "No tests were found" in the side-panel that lists individual tests.
Which Intellij IDE are you using? Please provide the specific version.
2024.3.3 Ultimate Edition
What programming languages and tools are you using? Please provide specific versions.
go-1.23.4, rules_go-0.50.1
What Bazel plugin version are you using?
2025.01.21.0.2-api-version-243
Have you found anything relevant by searching the web?
The attached issue above #6427, and supposedly fixed in #6634.
Any other information, logs, or outputs that you want to share?
Test run output.
bazel test --tool_tag=ijwb:IDEA:ultimate --color=yes --progress_in_terminal_title=no --disk_cache=/tmp/bazel_cache --build_event_binary_file=/var/folders/pd/4lmq9b9n08zgqc62vr7stz9w0000gn/T/intellij-bep-1f748fca-4cf2-40fa-8147-867192980f56 --nobuild_event_binary_file_path_conversion --build_event_publish_all_actions -- //golang/brackets/...:all
Testing started at 2:31 PM ...
INFO: Invocation ID: e952446a-ef26-4d75-94fd-eaab6d65e86f
Computing main repo mapping:
Loading:
Loading: 0 packages loaded
Analyzing: 2 targets (0 packages loaded, 0 targets configured)
Analyzing: 2 targets (0 packages loaded, 0 targets configured)
INFO: Analyzed 2 targets (0 packages loaded, 0 targets configured).
[6 / 7] 1 / 1 tests; Testing //golang/brackets:brackets_test; 0s darwin-sandbox, disk-cache
INFO: Found 1 target and 1 test target...
INFO: Elapsed time: 2.009s, Critical Path: 1.32s
INFO: 7 processes: 1 internal, 6 darwin-sandbox.
INFO: Build completed successfully, 7 total actions
INFO:
//golang/brackets:brackets_test PASSED in 0.5s
Executed 1 out of 1 test: 1 test passes.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
INFO: Build Event Protocol files produced successfully.
Further context: When running directly against the go test file itself, (right clicking on the brackets_test.go file, and selecting Bazel test brackets_test.go) works. The tests show up in the side-panel. When running across the whole package, it fails.