https://docs.adacore.com/gnatcoverage-docs/html/gnatcov/gnatcov_part.html
Author:Version:
26.2.1
Alire CI: Dependencies:No dependency.
Dependents:No dependents.
Badge:
GNATcoverage is a code coverage analysis tool offering support for a range of coverage metrics and output formats associated with powerful consolidation features letting users assess the combined coverage achievements of multiple program executions. It supports Ada, C and C++, but this binary only has Ada support.
Simple use example:
gprbuild -f -p -Ptests.gprgnatcov setup --prefix=/path/to/gnatcov-rtsGPR_PROJECT_PATH variable:
On UNIX systems, export GPR_PROJECT_PATH="$GPR_PROJECT_PATH:/path/to/gnatcov-rts/share/gpr"export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/path/to/gnatcov-rts/lib";
On Windows, set PATH=%PATH%;C:\path\to\gnatcov-rts\bingnatcov instrument -Ptests.gpr --level=stmtgprbuild -f -p -Ptests.gpr --src-subdirs=gnatcov-instr --implicit-with=gnatcov_rts.gpr.srctrace file will be produced in the current directory.gnatcov coverage --level=stmt --annotate=xcov *.srctrace -Ptests.gpr.
This produces annotated sources in the projects’ object directory, in the format filename.adb.xcov.Further information can be found in the GNATcoverage User’s Guide.