feat: phase2 review fixes

- TIME injection: change from spaces to '2500' (hour>23) for NUMVAL trigger
- Runner: add .resolve() to work_dir to fix chdir+relative path breakage
- Coverage: per-target field overrides for DP#9-#12 (START-DATE=20240115 etc.)
- .gitignore: add compilation artifacts, temp scripts, test outputs
This commit is contained in:
hangshuo652
2026-07-15 21:46:28 +08:00
parent f3be17e5eb
commit 54d4e81240
13 changed files with 769 additions and 188 deletions
+13 -2
View File
@@ -96,11 +96,18 @@ def _find_if_body_lines(source_lines: list[str], if_lineno_1: int):
n = len(source_lines)
for i in range(start, n):
line = source_lines[i].upper().strip()
if re.match(r'\bIF\b', line) and not re.match(r'ELSE\s+IF', line, re.IGNORECASE):
if re.match(r'ELSE\s+IF', line, re.IGNORECASE):
if depth == 1:
else_start_0 = i
depth += 1
continue
if re.match(r'\bIF\b', line):
depth += 1
if re.match(r'END-IF', line):
depth -= 1
if depth == 0:
if '.' in line:
depth = 0
if depth <= 0:
end_if_0 = i
break
if depth == 1 and re.match(r'ELSE\b', line):
@@ -172,12 +179,16 @@ def mark_from_gcov(decision_points: list, gcov_data: dict[int, int],
dp.active_branches.add('F')
elif dp.kind == 'EVALUATE':
for bn in dp.branch_names:
dp.active_branches.discard(bn)
if count == 0:
continue
for bn in dp.branch_names:
dp.active_branches.add(bn)
elif dp.kind == 'PERFORM':
dp.active_branches.discard('Enter')
dp.active_branches.discard('Skip')
if count > 1:
dp.active_branches.add('Enter')
dp.active_branches.add('Skip')