Skip to content

bug: coverage counts files not lines (always 1 stmt per file) #1118

@krystophny

Description

@krystophny

Category: bug
Priority: P0

PROBLEM: Markdown and JSON reports count files, not lines; all files show Stmts=1 and overall 100% coverage regardless of actual execution.

EVIDENCE:

  • Commands run:
    • fpm test --flag "-fprofile-arcs -ftest-coverage"
    • build/gfortran_*/app/fortcov --output=coverage.md
  • coverage.md tail:
    | TOTAL | 249 | 249 | 100.00% | |
  • Per-file rows show Stmts=1, Covered=1 for every file.
  • JSON summary (coverage.json): total_lines=249, covered_lines=249; each file has only 3 line entries.

SOLUTION:

  • Fix gcov parsing/aggregation to compute real executable/covered line counts.
  • Add unit tests for parser; integration test on this repo to assert Stmts > 1 and totals != file count.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions