Coverage
Simple coverage statistics collection for bash scripts to compute testing code coverage.
bashCoverage
Collect code coverage statistics for a code sample
Usage
bashCoverage [ --target reportFile ] thingToRun
Collect code coverage statistics for a code sample
Convert resulting files using bashCoverageReport
Location:
bin/build/tools/coverage.sh
Arguments
--target reportFile- File. Optional. Write coverage data to this file.thingToRun- Callable. Required. Function to run and collect coverage data.
Return codes
0- Success1- Environment error2- Argument error
See Also
- bashCoverageReport - Experimental. Likely abandon. (source)
bashCoverageEnabled
Is bash coverage currently running?
Usage
bashCoverageEnabled [ --help ]
Is bash coverage currently running?
Location:
bin/build/tools/coverage.sh
Arguments
--help- Flag. Optional. Display this help.
Return codes
0- Yes, it's running.1- No, it is not running.=2- Argument error
Reporting - work in progress
bashCoverageReport
Experimental. Likely abandon.
Usage
bashCoverageReport [ --cache cacheDirectory ] [ --target targetDirectory ] statsFile
Generate a coverage report using the coverage statistics file
This is a work in progress and is unfinished as of January 2026. Plans are to do this in another language.
Location:
bin/build/tools/coverage.sh
Arguments
--cache cacheDirectory- Optional. Directory.--target targetDirectory- Optional. Directory.statsFile- File. Required.
Reads standard input
Accepts a stats file
Return codes
0- Success1- Environment error2- Argument error