Empty coverage.dat file for c++ when setting LCOV_MERGER

197 views
Skip to first unread message

Tanmay Rustagi

unread,
Aug 29, 2022, 3:52:57 AM8/29/22
to bazel-discuss
Hi Team, 

We are trying to get coverage for c++ files using bazel coverage. When we use the following startup option in our .bazelrc:
coverage:linux --test_env=LCOV_MERGER=/bin/true

we get an empty coverage.dat file, however if we don't use it, then it works i.e. the coverage.dat file is not empty but we require the LCOV_MERGER to be set as otherwise bazel coverage fails for files in other language like scala because it expects the merger to be set. 

I have went through the issue: https://github.com/bazelbuild/bazel/issues/7719 which seems relevant but couldn't get a clear answer of why this is happening. Do you know something about this? Why would setting the LCOV_MERGER lead to an empty coverage.dat files for c++ only?

Thank you,
Tanmay
Reply all
Reply to author
Forward
0 new messages