Lines Matching +full:cov +full:- +full:int
3 # Use of this source code is governed by a BSD-style license that can be
21 The file paths printed by llvm-cov take the form:
35 return filename.split('..')[-1].lstrip('./')
39 """Return the name of the checked-in file matching the given filename.
41 Use suffix matching to determine which checked-in files the given filename
76 not_checked_in = '%' # Use this as the file name for not-checked-in files.
78 m = re.match('([a-zA-Z0-9\./_-]+):', line)
87 skip = re.match('^\s{2}-+$|^\s{2}\|.+$', line)
89 cov, linenum, code = line.split('|', 2)
90 cov = cov.strip()
91 if cov:
92 cov = int(cov)
94 cov = None # We don't care about coverage for this line.
95 linenum = int(linenum.strip())
97 file_lines.append((linenum, cov, code.decode('utf-8', 'replace')))
104 return re.sub(r'[^a-zA-Z0-9]', '_', filename)
152 """Summarize the full line-by-line coverage report by file."""
157 for _, cov, _ in lines:
158 if cov is not None:
160 if cov > 0:
164 total_lines - covered_lines,
173 parser.add_argument('--report', help='input file; an llvm coverage report.',
175 parser.add_argument('--nanobench', help='output file for nanobench data.')
177 '--key', metavar='key_or_value', nargs='+',
180 '--properties', metavar='key_or_value', nargs='+',
182 parser.add_argument('--linebyline',
183 help='output file for line-by-line JSON data.')
187 raise Exception('--key and --properties are required with --nanobench')
203 # Get per-file summaries.