feat: config-driven multi-scenario + gcda accumulation fix + gcov merge fix
Config-driven architecture: - coverage_dates: YAML-driven date replacement for LEAVE_RECORDS - row_overrides: per-scenario field overrides (e.g. STATUS='9') - delete_all_rows: per-scenario table emptying for empty-cursor tests gcda accumulation fix (V3 bug #7): - Delete .gcda before each scenario run to prevent GnuCOBOL accumulation - Force-copy scenario gcda (skip mtime check) - Copy scenario DB to CWD data/kin.db for CONNECT TO path resolution Multi-run gcov merge fix: - Always merge multi-run gcov data regardless of generate_coverage flag - Fix v3_root UnboundLocalError in cleanup path Other fixes: - _make_key_unique: skip WHERE-constrained columns to avoid PK conflict - incremental_supplement: support fields_dict for base record generation - check_coverage: use structure coverage data if available - orchestrator.py: filter _-prefixed fields in TestCase; merge Agent2Data cases
This commit is contained in:
@@ -40,6 +40,8 @@ class ScenarioDef:
|
||||
id: str
|
||||
sysin: SysinDef = field(default_factory=SysinDef)
|
||||
inject_duplicate_pk: bool = False
|
||||
row_overrides: dict[str, dict[str, str]] = field(default_factory=dict)
|
||||
delete_all_rows: bool = False
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -50,6 +52,7 @@ class ProgramSchema:
|
||||
db_type: str = "SQLite"
|
||||
db_name: str = "OVERTIME.DB"
|
||||
runs: list[ScenarioDef] = field(default_factory=list)
|
||||
coverage_dates: dict[str, list[dict[str, str]]] = field(default_factory=dict)
|
||||
|
||||
@classmethod
|
||||
def from_yaml(cls, path: str | Path) -> ProgramSchema:
|
||||
@@ -71,6 +74,8 @@ class ProgramSchema:
|
||||
id=r["id"],
|
||||
sysin=SysinDef(**sysin_raw),
|
||||
inject_duplicate_pk=r.get("inject_duplicate_pk", False),
|
||||
row_overrides=r.get("row_overrides", {}),
|
||||
delete_all_rows=r.get("delete_all_rows", False),
|
||||
))
|
||||
return cls(
|
||||
program_id=raw["program_id"],
|
||||
@@ -79,6 +84,7 @@ class ProgramSchema:
|
||||
db_type=raw.get("db_type", "SQLite"),
|
||||
db_name=raw.get("db_name", "OVERTIME.DB"),
|
||||
runs=runs,
|
||||
coverage_dates=raw.get("coverage_dates", {}),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -35,3 +35,47 @@ subprograms:
|
||||
- SUB01DAT
|
||||
- SUB02MSG
|
||||
- SUB03END
|
||||
|
||||
coverage_dates:
|
||||
LEAVE_RECORDS:
|
||||
- start: "20260701"
|
||||
end: "20260701"
|
||||
emp: "00000001"
|
||||
- start: "20260702"
|
||||
end: "20260702"
|
||||
emp: "00000001"
|
||||
- start: "20260704"
|
||||
end: "20260704"
|
||||
emp: "00000001"
|
||||
- start: "20260705"
|
||||
end: "20260705"
|
||||
emp: "00000001"
|
||||
- start: "20260131"
|
||||
end: "20260203"
|
||||
emp: "00000002"
|
||||
- start: "20260430"
|
||||
end: "20260502"
|
||||
emp: "00000002"
|
||||
- start: "20240228"
|
||||
end: "20240302"
|
||||
emp: "00000003"
|
||||
- start: "20230228"
|
||||
end: "20230302"
|
||||
emp: "00000003"
|
||||
- start: "20240229"
|
||||
end: "20240302"
|
||||
emp: "00000004"
|
||||
- start: "20230227"
|
||||
end: "20230302"
|
||||
emp: "00000004"
|
||||
- start: "20261230"
|
||||
end: "20270101"
|
||||
emp: "00000099"
|
||||
|
||||
runs:
|
||||
- id: normal
|
||||
- id: empty_cursor
|
||||
delete_all_rows: true
|
||||
row_overrides:
|
||||
LEAVE_RECORDS:
|
||||
STATUS: "9"
|
||||
|
||||
Reference in New Issue
Block a user