cli.cov

Generate coverage reports from otto test --cov output.

Merges .gcda files collected from one or more otto test runs, processes them with lcov, and renders a multi-tier HTML report.

Usage:

otto cov report RUN_DIR1 [RUN_DIR2 ...] --report ./my_report

Each RUN_DIR is an otto test output directory containing a cov/ subdirectory with per-host .gcda files. Multiple directories can be specified to stitch together coverage from separate test runs.

Per-host toolchains (gcov, lcov) are resolved automatically from host configuration in hosts.json or by inspecting .gcno files. See the Coverage Collection and Working with hosts documentation.

Options

--report PATH

Where to place the generated HTML report (default: ./cov_report).

--project-name STR

Title shown in the HTML report header.

--tier NAME[=PATH]

Repeatable. Add a coverage tier to the report. NAME is a free-form label (e.g. unit, manual, integration); PATH is the lcov .info file feeding that tier. The bare form --tier system (no path) refers to the implicit system tier produced by merging the supplied .gcda directories.

The order of --tier flags is the precedence order: the first flag is the highest-precedence tier and wins the row coloring on the annotated source view. If no --tier flags are given, defaults to --tier system.

Example:

otto cov report runs/ \
    --tier unit=u.info \
    --tier system \
    --tier integration=i.info \
    --tier manual=m.info
otto.cli.cov.cov_callback(ctx: Context) None

Generate coverage reports from otto test –cov output.

otto.cli.cov.report(output_dirs: ~typing.Annotated[list[~pathlib.Path], <typer.models.ArgumentInfo object at 0x7fcc409f4160>], report_dir: ~pathlib.Annotated[~pathlib.Path, <typer.models.OptionInfo object at 0x7fcc409f6140>] = PosixPath('cov_report'), project_name: ~typing.Annotated[str, <typer.models.OptionInfo object at 0x7fcc409f4460>] = 'Coverage Report', tier: ~typing.Annotated[list[str], <typer.models.OptionInfo object at 0x7fcc409f7040>] = []) None

Generate a coverage report from otto test –cov output directories.