![]() ![]() The report combination action cannot yet run remotely.Running with remote test execution currently has a few caveats: Lcov coverage format, see the lcov project. To view the result, simply open the index.html file produced in theįor further help and information around the genhtml tool, or the Genhtml is executed in the root of the bazel project. Note that genhtml reads the source code as well, to annotate missingĬoverage in these files. Project) to produce a report that can be viewed in a webīrowser: genhtml -output genhtml "$(bazel info output_path)/_coverage/_coverage_report.dat" From this, we can use the genhtml utility (part of the lcov The coverage report is only output in the non-human-readable lcovįormat. This does not extend to the failed tests - only passing tests are Output_path)/_coverage/_coverage_report.dat.Ĭoverage reports are also produced if tests fail, though note that Once finished, bazel runs an action that collects all the producedĬoverage files, and merges them into one, which is then finally Tests for the target, generating coverage reports in the lcov format To produce a coverage report, use bazel coverage To enable instrumentation for tests, theīy default, bazel tries to match the target package(s), and prints the Bazel allows turning this on for aįlag, which specifies a filter for targets that are tested with the "Instrumentation" in this case refers to the coverage tools that are However the latter can be more difficult for complex projects. The former two are language-specific and mostly straightforward, A correct "instrumentation" configuration.A toolchain with the language-specific code coverage tools installed.The basic workflow for creating coverage reports requires the ![]() Producing and consuming lcov reports, which is currently the While a lot of customization is possible, this document focuses on Remote execution section, which requires some Reading about the requirements for a specific language. Languages whose configuration is well-known. This page documents the general process for creating and viewingĬoverage reports, and also features some language-specific notes for To the idiosyncrasies of the various language ecosystems, it is notĪlways trivial to make this work for a given project. Reports on repositories that can be tested with bazel coverage. Bazel features a coverage sub-command to produce code coverage ![]()
0 Comments
Leave a Reply. |