(&self)
| 118 | } |
| 119 | |
| 120 | fn count_branch(&self) -> Result<usize> { |
| 121 | let acc_file = self.get_seeds_accumulated_coverage_file()?; |
| 122 | |
| 123 | Executor::merge_profdata(&self.cover_files, &acc_file)?; |
| 124 | if !acc_file.exists() { |
| 125 | eyre::bail!("seed accumulated coverage file not found"); |
| 126 | } |
| 127 | let executor = Executor::new(self.deopt)?; |
| 128 | let code_coverage = executor.obtain_cov_from_profdata(&acc_file)?; |
| 129 | let branch_count = code_coverage.get_covered_branch().len(); |
| 130 | Ok(branch_count) |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | fn collect_accumulation_coverage(deopt: &Deopt, is_rand_bench: bool) -> Result<()> { |
no test coverage detected