fix: gcov Windows本地化 + runner合并 + 决策覆盖率修复

- gcov从WSL 15.2改为Windows MinGW 9.2.0,消除.gcno格式不匹配
- coverage.py去除leaf_stats复位bug(决策覆盖率恢复)
- runner.py合并V3编译+SOURCE分组执行+出力保存
- __init__.py gcov条件/outdir解析修复
This commit is contained in:
hangshuo652
2026-07-02 21:26:51 +08:00
parent b3d1643220
commit 40e8a50ab4
6 changed files with 635 additions and 21 deletions
+5 -2
View File
@@ -288,6 +288,9 @@ def main():
if '--gcov' in args:
gcov_mode = True
args.remove('--gcov')
if not _HAVE_RUNNER:
logger.warning("--gcov: runner.py not found. Compile/run will be skipped. "
"Use --gcov without runner only generates test data + static coverage.")
i = 0
while i < len(args):
if args[i] == '--temp-dir':
@@ -309,7 +312,7 @@ def main():
outdir = None
for a in args:
p = Path(a)
if p.is_dir():
if p.is_dir() or (not p.suffix and p.parent.exists()):
outdir = p
elif p.suffix.upper() in ('.CBL', '.COB', '.CPY'):
cobol_files.append(p)
@@ -553,7 +556,7 @@ def main():
data_fields=fields_dict, select_info=select_info)
gcov_data = None
if gcov_mode and proc_div and _HAVE_GCOV:
if gcov_mode and proc_div and _HAVE_GCOV and _HAVE_RUNNER:
_temp = temp_dir or str(outdir / '.gcov_cache')
source_dir = str(filepath.parent)
expected_records: list[dict] = [{}] * len(records)