Patch gcovr script - take 3
parent
c60d562c8c
commit
515b93e9e7
|
|
@ -619,6 +619,10 @@ def process_gcov_data(data_fname, covdata, source_fname, options):
|
||||||
is_code_statement = False
|
is_code_statement = False
|
||||||
if tmp[0] == '-' or (excluding and tmp[0] in "#=0123456789"):
|
if tmp[0] == '-' or (excluding and tmp[0] in "#=0123456789"):
|
||||||
is_code_statement = True
|
is_code_statement = True
|
||||||
|
if len(segments) < 3:
|
||||||
|
noncode.add(lineno)
|
||||||
|
continue
|
||||||
|
|
||||||
code = segments[2].strip()
|
code = segments[2].strip()
|
||||||
# remember certain non-executed lines
|
# remember certain non-executed lines
|
||||||
if excluding or is_non_code(segments[2]):
|
if excluding or is_non_code(segments[2]):
|
||||||
|
|
@ -632,11 +636,9 @@ def process_gcov_data(data_fname, covdata, source_fname, options):
|
||||||
elif tmp[0] == '=':
|
elif tmp[0] == '=':
|
||||||
is_code_statement = True
|
is_code_statement = True
|
||||||
uncovered_exceptional.add(lineno)
|
uncovered_exceptional.add(lineno)
|
||||||
elif tmp[0] in "0123456789" and segments[0].endswith("*"):
|
|
||||||
continue
|
|
||||||
elif tmp[0] in "0123456789":
|
elif tmp[0] in "0123456789":
|
||||||
is_code_statement = True
|
is_code_statement = True
|
||||||
covered[lineno] = int(segments[0].strip())
|
covered[lineno] = int(segments[0].strip().rstrip('*'))
|
||||||
elif tmp.startswith('branch'):
|
elif tmp.startswith('branch'):
|
||||||
exclude_branch = False
|
exclude_branch = False
|
||||||
if options.exclude_unreachable_branches and \
|
if options.exclude_unreachable_branches and \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue