mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-14 16:57:41 -04: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:
parent
e39c34ba7e
commit
19271ddc8d
1 changed files with 1 additions and 1 deletions
|
@ -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"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue