Skip to content

Commit

Permalink
Skip merging profraw data if profraw files don't exist and a profdata…
Browse files Browse the repository at this point in the history
… file already exists (#360)
  • Loading branch information
weiznich authored Apr 5, 2024
1 parent 1490458 commit 2387e18
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,9 @@ fn merge_profraw(cx: &Context) -> Result<()> {
.filter_map(Result::ok)
.collect::<Vec<_>>();
if profraw_files.is_empty() {
if cx.ws.profdata_file.exists() {
return Ok(());
}
warn!(
"not found *.profraw files in {}; this may occur if target directory is accidentally \
cleared, or running report subcommand without running any tests or binaries",
Expand Down

0 comments on commit 2387e18

Please sign in to comment.