Private API
This page lists non-exported (internal) symbols of CoveragePostprocessing.
From CoveragePostprocessing
_clean_stale_cov_files!
CoveragePostprocessing._clean_stale_cov_files! — Function
_clean_stale_cov_files!(source_dirs)Internal helper that removes stale .cov files from source_dirs.
If multiple runs are detected (PID suffix in filenames), this function keeps the PID with the largest number of .cov files and removes the others.
_collect_and_move_cov_files!
CoveragePostprocessing._collect_and_move_cov_files! — Function
_collect_and_move_cov_files!(source_dirs, dest_dir) -> Vector{String}Internal helper that moves all .cov files from source_dirs into dest_dir.
Returns a vector of destination paths for the moved files.
_count_cov_files
CoveragePostprocessing._count_cov_files — Function
_count_cov_files(source_dirs) -> IntInternal helper that counts the number of .cov files in the provided directories.
_generate_coverage_reports!
CoveragePostprocessing._generate_coverage_reports! — Function
_generate_coverage_reports!(source_dirs, coverage_dir, root_dir)Internal helper that generates coverage reports from .cov files.
Writes:
coverage/lcov.infocoverage/cov_report.md
_reset_coverage_dir
CoveragePostprocessing._reset_coverage_dir — Function
_reset_coverage_dir(coverage_dir, cov_storage_dir)Internal helper that recreates the coverage/ directory structure.
This function removes coverage_dir (recursively) if it already exists, then creates cov_storage_dir.
CTBase.postprocess_coverage
CTBase.postprocess_coverage — Method
CTBase.postprocess_coverage(::CTBase.CoveragePostprocessingTag; generate_report::Bool=true, root_dir::String=pwd())Post-process coverage artifacts produced by Pkg.test(; coverage=true).
This implementation:
- Collects coverage source directories under
root_dir(src/,test/,ext/when present) - Resets the
coverage/directory - Removes stale
.covfiles (keeping the most complete PID suffix when multiple runs exist) - Optionally generates reports (LCOV + markdown report)
- Moves
.covfiles intocoverage/cov/(recursively from source dirs)
Keyword Arguments
generate_report::Bool=true: Iftrue, writecoverage/lcov.infoandcoverage/cov_report.md.root_dir::String=pwd(): Root directory of the project.
Returns
Nothing
Notes
This function creates/removes/moves files and directories under root_dir.
Usage sketch (non-executed)
using CTBase
# CTBase.postprocess_coverage(; generate_report=true, root_dir=pwd())