pub fn last_run_report(
dir: Option<&Path>,
kernel: Option<&str>,
) -> Option<String>Expand description
Read sidecar JSON files and return the gauntlet analysis report
for cargo ktstr stats last-run.
Source directory, in precedence order:
dir(the--dirflag) whenSome— analyzed verbatim, mirroringcrate::test_support::analyze_sidecars(Some(dir)).KTSTR_SIDECAR_DIRwhen set non-empty — the same env overrideanalyze_sidecars(None)honors.kernel(the--kernelflag) whenSome— the most recently modified run dir whose leaf name begins{kernel}-(seenewest_run_dir_for_kernel).- Otherwise the most recently modified run dir under the cargo
target directory’s
ktstr/(crate::test_support::newest_run_dir).
cargo ktstr stats doesn’t itself run a kernel, so it can’t
reconstruct the {kernel}-{project_commit} key the test process
used; the mtime fallback (and the --kernel prefix match) stand in
for “show me the report from my last test run.”
Returns None with a warning on stderr when no sidecars are found.
This is not an error – regular test runs that skip gauntlet tests
produce no sidecar files.