gr-mcp/docker/.coveragerc
Ryan Malloy bfab802e05 coverage: add cross-process coverage collection for containerized flowgraphs
New MCP tools:
- collect_coverage(name) - combine parallel files, return summary
- generate_coverage_report(name, format) - HTML/XML/JSON reports
- combine_coverage(names) - aggregate across test runs
- delete_coverage(name?, older_than_days?) - cleanup

Modified:
- launch_flowgraph() now accepts enable_coverage parameter
- stop() uses 30s timeout for graceful shutdown (coverage needs atexit)

Docker:
- Dockerfile.gnuradio-coverage extends runtime with python3-coverage
- entrypoint-coverage.sh wraps execution with coverage run
- .coveragerc configured for GNU Radio source paths

Tests: 125 unit tests (21 new), 80% coverage
2026-01-27 13:50:17 -07:00

61 lines
1.3 KiB
INI

# Coverage.py configuration for GNU Radio flowgraph execution
# See: https://coverage.readthedocs.io/en/latest/config.html
[run]
# Source packages to measure coverage for
source =
gnuradio
/flowgraphs
# Include branch coverage for more detailed analysis
branch = True
# Enable parallel mode for combining coverage from multiple runs
parallel = True
# Omit test files and virtual environments from coverage
omit =
*/tests/*
*/test_*
*/qa_*
*/.venv/*
*/site-packages/*
*/dist-packages/pybind11*
# Dynamic context based on function names (useful for debugging)
dynamic_context = test_function
[paths]
# Map container paths to host paths for combining coverage
source =
/usr/lib/python3/dist-packages/gnuradio
/flowgraphs
[report]
# Exclude lines from coverage analysis
exclude_lines =
pragma: no cover
def __repr__
raise NotImplementedError
if __name__ == .__main__.:
if TYPE_CHECKING:
@abstractmethod
# Show missing line numbers in reports
show_missing = True
# Minimum coverage percentage (optional, for CI)
# fail_under = 50
[html]
# HTML report output directory
directory = /coverage/htmlcov
[xml]
# Cobertura XML output (for CI integration)
output = /coverage/coverage.xml
[json]
# JSON output for programmatic access
output = /coverage/coverage.json