docs: --nocache_test_results may actually not always be required for coverage
Description of the bug:
https://bazel.google.cn/docs/coverage?hl=en#remote-execution
Bazel will currently fail to create coverage information if tests have been cached previously. To work around this, --nocache_test_results can be set specifically for coverage runs, although this of course incurs a heavy cost in terms of test times.
While actually it seems that coverage information can be retrieved from remote cache (at least when test were run locally and only cached remotely?)
$ bazel coverage //:something
//:something (cached) PASSED in 2.2s
/..../.cache/bazel/..../bazel-out/k8-fastbuild/testlogs/...../coverage.dat
baseline_coverage.dat file is also present
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which operating system are you running Bazel on?
NixOS
What is the output of bazel info release?
release 5.1.1- (@non-git)
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
NixOS nixpkgs
What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
Hey @dmivankov, could you please provide us with the steps to reproduce the issue? Thanks!
Hello @dmivankov, If you are looking resolution for the above request. Could you please share the complete steps to reproduce the above issue. Thank you!
We are marking the above Issue as stale because it has not had any recent activity from many days. It will be closed in 7 days if there is no further activity occurs. Thank you.
Closing as it is stale. Please reach us back if you still looking resolution for the above request or open a new issue adding the above as reference.
There are no steps to reproduce documentation issues, sorry
Could you please elaborate your above request. thanks!
Docs say that using --nocache_test_results is needed to get test coverage and that test coverage can't be cached.
But actually running bazel coverage without --nocache_test_results can produce coverage output and put coverage output into cache & get it from cache. Maybe this is dependent on rules used or something else, that I'm not entirely sure about.