feat: 多轮运行 + GCOV 合并 + JSON 出力 + DesignDataGenerator

This commit is contained in:
hangshuo652
2026-07-12 21:04:58 +08:00
parent af37e33b98
commit f3be17e5eb
40 changed files with 4397 additions and 198 deletions
+29
View File
@@ -24,6 +24,24 @@ class TableDef:
sql_name: Optional[str] = None # COBOL SQL table name if different from YAML name
@dataclass
class SysinDef:
"""SYSIN card configuration for a single run scenario.
Each program defines its own sysin fields; period/modes are KIN08DBU specific.
"""
period: str | None = "202607"
include_invalid_period: bool = False
modes: list[str] = field(default_factory=lambda: ["NORMAL"])
@dataclass
class ScenarioDef:
"""A single run scenario: one set of inputs for one COBOL execution."""
id: str
sysin: SysinDef = field(default_factory=SysinDef)
inject_duplicate_pk: bool = False
@dataclass
class ProgramSchema:
program_id: str
@@ -31,6 +49,7 @@ class ProgramSchema:
subprograms: list[str] = field(default_factory=list)
db_type: str = "SQLite"
db_name: str = "OVERTIME.DB"
runs: list[ScenarioDef] = field(default_factory=list)
@classmethod
def from_yaml(cls, path: str | Path) -> ProgramSchema:
@@ -44,12 +63,22 @@ class ProgramSchema:
name=t["name"], columns=cols,
sql_name=t.get("sql_name"),
))
runs_raw = raw.get("runs", [])
runs = []
for r in runs_raw:
sysin_raw = r.get("sysin", {})
runs.append(ScenarioDef(
id=r["id"],
sysin=SysinDef(**sysin_raw),
inject_duplicate_pk=r.get("inject_duplicate_pk", False),
))
return cls(
program_id=raw["program_id"],
db_tables=tables,
subprograms=raw.get("subprograms", []),
db_type=raw.get("db_type", "SQLite"),
db_name=raw.get("db_name", "OVERTIME.DB"),
runs=runs,
)