update error message when coverage extraction fails (#539)

This commit is contained in:
bmc-msft
2021-02-11 14:18:49 -05:00
committed by GitHub
parent 18d9daf909
commit 1e536c54d3

View File

@ -90,7 +90,16 @@ impl CoverageRecorder {
coverage_path.display()
)
})?;
bail!("no coverage files for input: {}", test_input.display());
let filename = test_input
.file_name()
.ok_or_else(|| format_err!("unable to identify coverage input filename"))?;
bail!(
"coverage extraction from {} failed when processing file {:?}. target appears to be missing sancov instrumentation",
self.config.target_exe.display(),
filename
);
}
Ok(coverage_path)