Reports
The reports module provides common report handling shared by test and build macros.
Dependencies
No additional tool dependency is required.
Features
shared JUnit result processing for pytest and CTest
XUnit artifact registration and result persistence
test result badges
test summary reports
build summary reports with available tool, compiler, build, and timing metadata
timeline integration
memory usage tables
build artifact and bundle tables with download links, file sizes, and hash values
collapsible command log integration
RST artifact registration
Typical test report usage:
from cikit.macros import reports
reports.badge(env)
reports.write_test_report(env)
Typical build report usage:
from cikit.macros import reports
reports.write_build_report(env, report_title="Build Report")
Build-specific macros such as cmake and platformio expose their own
write_rst() wrappers and use the generic build report internally.
Custom test tools
Custom test integrations can pass a JUnit-compatible XML report to
process_test_result():
reports.process_test_result(env, "custom", report_file, returncode)
The helper validates and registers the report, persists metrics and the exit
code, and raises CiRecoverableError for non-zero exit codes with valid
results. Missing or invalid reports raise CiToolsError.