minor changes and addeed debug tests

This commit is contained in:
Martino Ferrari
2026-07-02 16:27:40 +02:00
parent f2042d624b
commit 2d5ca20ae4
9 changed files with 724 additions and 158 deletions
Binary file not shown.
+6 -3
View File
@@ -279,12 +279,15 @@ def cpp_coverage(repo, target):
if rc != 0 or not os.path.exists(raw):
cov["note"] = "lcov capture failed: " + (err or out or "")[-160:]
return cov
# Keep only this repo's own sources so the number reflects project code,
# not the MARTe2 framework headers dragged in by templates/inlines.
# Keep only this repo's own Source/ code so the number reflects project
# code under test, not the MARTe2 framework headers dragged in by
# templates/inlines, and not the Test/ harness itself (GTest/Integration
# test .cpp files execute every line by construction and sit at ~100%,
# which would just inflate the aggregate and clutter the per-file table
# with files that were never meant to be "covered").
info = os.path.join(build, "coverage.info")
rc2, _, e2 = _run(["lcov", "--extract", raw,
os.path.join(repo, "Source", "*"),
os.path.join(repo, "Test", "*"),
"--output-file", info, "--quiet"] + ign, timeout=300)
summ_file = info if (rc2 == 0 and os.path.exists(info)) else raw
# Parse the tracefile directly for per-file detail; this also yields the
Binary file not shown.