Files
ToastyFS/scripts

Branch Coverage Measurement

This directory contains scripts for measuring branch coverage of the random simulation.

Prerequisites

The HTML report generation requires lcov:

sudo apt-get install lcov

Usage

Quick text summary (5 second simulation)

make coverage-report

HTML report with branch details (5 second simulation)

make coverage-html

Custom duration

./scripts/measure_coverage.sh 10          # 10 second run, text output
./scripts/measure_coverage.sh 10 --html   # 10 second run, HTML output

What gets measured

The coverage tool:

  • Builds the test binary with coverage instrumentation (--coverage flag)
  • Runs the random simulation for the specified duration
  • Generates reports showing which branches were executed

Output

Text report: Shows per-file and total branch coverage percentages

HTML report: Interactive report generated by lcov/genhtml showing:

  • Overall coverage summary
  • Per-file coverage breakdown
  • Source code with execution counts
  • Branch coverage details

The HTML report is generated in coverage_report/index.html