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 otto host 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)

Generate coverage reports from otto test –cov output.

Return type:

None

otto.cli.cov.report(output_dirs, report_dir=PosixPath('cov_report'), project_name='Coverage Report', tier=[])

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

Return type:

None