Files
cobol-java-v3/docs/output-directory-rules.md
T

54 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 出力目录规则
## 单轮(runs: [] 或 YAML 不存在)
```text
runtime/{program_id}/
input/KIN08R01, KIN08S01 ← COBOL 入力平面文件
json/{program_id}.json ← JSONinput/working_storage/termination
output/KIN08W01 ← COBOL 出力平面文件
gcov/ ← .gcda/.gcno(直下)
```
## 多轮(runs: 定义在 config/programs/{program_id}.yaml 中)
```text
runtime/{program_id}/
run_{scenario_id}/
input/KIN08R01, KIN08S01 ← 該当场景の入力
json/{program_id}.json ← 該当场景の JSON
output/KIN08W01 ← 該当场景の COBOL 出力
gcov/
run_{scenario_id}/ ← 該当场景の .gcda/.gcno
```
## 单轮/多轮共有
- 编译: `work_dir/bin/{program_id}.exe`(全场景共享)
- .gcno: `work_dir/bin/{program_id}_pp.gcno`(编译时生成,COPY 到各场景)
- DB: `C:/Temp/gix/{program_id}_{scenario_id}.db`(多轮场景)或 `C:/Temp/gix/{program_id}.db`(单轮)
- 运行前 COPY 到 `C:/Temp/gix/{program_id}.db`COBOL 的 gixsql 硬编码连接此路径)
- SYSIN 文件: 由 `write_sysin_file(run_cfg=scenario.sysin)` 按场景生成
## 覆盖率合并(多轮)
- 各场景独立跑 gcov → 解析 `.cbl.gcov``{line: count}` 字典
- Python 级合并: `merged[line] = max(各场景的 count)`
- 合并后数据传给 `run_coverage()`
## YAML 场景定义格式
`config/programs/{program_id}.yaml` 追加 `runs:` 字段:
```yaml
runs:
- id: normal
sysin:
period: "202607" # P 卡値(null=无 P 卡)
include_invalid_period: true # 是否追加无效 P 卡
modes: ["NORMAL", "RESET"] # M 卡列表
inject_duplicate_pk: false
```
每个场景的 `sysin` 字段由该程序的 `write_sysin_file()` 解析,字段含义不跨程序通用。