整理 App 与 test 目录:按职责分子目录并同步全库引用

This commit is contained in:
2026-09-26 12:51:07 +08:00
parent 39bd06adea
commit 22559365b9
90 changed files with 2650 additions and 2487 deletions
+52
View File
@@ -0,0 +1,52 @@
# test/host/ — 主机端测试脚本
> PC 侧的测试驱动与判读脚本(Python,跑在开发机上,经串口/网络与目标板交互)。
## 文件一览
### 流程与判读
| 脚本 | 作用 |
|---|---|
| `run_boot_test.py` | **`@test` 一键闭环**:开串口+清日志 → 烧录 → wait-idle → `verify_log` 校验(退出码 0=PASS) |
| `verify_log.py` | **日志标记校验**:Required / Forbidden 标记 → PASS / FAIL |
| `e02_probe.py` | E-02 专项探针(错误码传播审计) |
### 网络 / FTP
| 脚本 | 作用 |
|---|---|
| `ch395f_socket_test.py` | Socket 通信测试(回显服务器 / 文件收发) |
| `ftp_test.py` | FTP 基本功能测试 |
| `ftp_up_dl_test.py` | FTP 上传下载测试 |
| `ftp_speed_test.py` | FTP 传输速度测试 |
| `ftp_capture.py` | FTP 流量抓取 |
| `ftp_regression.py` | FTP 回归套件 |
### 时间 / 时延
| 脚本 | 作用 |
|---|---|
| `latency_peer.py` | 链路时延测试的 PC 对端(peer) |
| `time_sync_server.py` | 时间同步推送服务(对时源) |
## 运行方式
```bash
# @test 一键闭环(推荐)
& '.venv\Scripts\python.exe' test/host/run_boot_test.py
```
> 串口端口配置在 `.opencode/serial_config.json`(单一配置源,当前 COM6/115200)。
## ⚠️ 注意
- **PYTHONPATH/路径敏感**:脚本按仓库根相对路径读写,**从仓库根执行**
- 本目录**被 pre-commit 门禁排除**
- 台架探针族(TCP 复连 / FTP 中止等)在 `MDK-ARM/*.py`,与本目录分工不同
## 相关文档
- `docs/测试说明/自动化测试流程.md` — `@test` 细节与失败模式
- `docs/测试说明/测试开发标准流程.md` — 测试分层与门禁
- `docs/测试说明/CH395F_Test_Guide.md`、`FTP_Test_Guide.md`