def run_cov_new_units(self): """Run the coverage binary on new units.""" coverage_binary = coverage_utils.get_coverage_binary(self.benchmark) crashing_units = run_coverage.do_coverage_run( coverage_binary, self.corpus_dir, self.profraw_file_pattern, self.crashes_dir) self.UNIT_BLACKLIST[self.benchmark] = ( self.UNIT_BLACKLIST[self.benchmark].union(set(crashing_units)))
def generate_summary(self, cycle: int, summary_only=True): """Transforms the .profdata file into json form.""" coverage_binary = coverage_utils.get_coverage_binary(self.benchmark) result = coverage_utils.generate_json_summary( coverage_binary, self.profdata_file, self.cov_summary_file, summary_only=summary_only) if result.retcode != 0: if cycle != 0: self.logger.error( 'Coverage summary json file generation failed for ' 'cycle: %d.', cycle) else: self.logger.error( 'Coverage summary json file generation failed in the end.')