mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-06-24 10:10:25 +08:00
Work around gcov json output bug
When gcov outputs into it's intermediate json format, sometimes it marks blocks as unexecuted but also sets an execution count != 0. In this case, the "count" field is correct, but the "unexecuted_block" field is incorrect. When outputting lcov formatted coverage data in filtercov.py, only output a branch coverage data lines (BRDA) with a "-" for the "taken" field when both count==0 and unexecuted_block==true in the input gcov json intermediate file.
This commit is contained in:

committed by
Paul Bartell

parent
e39c34ba7e
commit
19271ddc8d
@ -308,7 +308,7 @@ def convert_to_lcov_info(args, covdata, outfile):
|
|||||||
# Handle branch data
|
# Handle branch data
|
||||||
for target_branch in target_line["branches"]:
|
for target_branch in target_line["branches"]:
|
||||||
branch_count = "-"
|
branch_count = "-"
|
||||||
if target_line["unexecuted_block"] or target_line["count"] == 0:
|
if target_line["unexecuted_block"] and target_line["count"] == 0:
|
||||||
branch_count = "-"
|
branch_count = "-"
|
||||||
elif "count" in target_branch:
|
elif "count" in target_branch:
|
||||||
branch_count = target_branch["count"]
|
branch_count = target_branch["count"]
|
||||||
|
Reference in New Issue
Block a user