thun-res/vlink / .agents/skills/test
test
Verified按 Linux、macOS 或 Windows 的仓库测试链路配置并构建普通 vlink-test、C API 与 Python 绑定,运行完整 CTest、绑定测试或指定 suite/case 并汇总失败。用户要求"跑 test"、"执行单元测试"、 "测试 c_api/python_api"、"只测某个 suite/case"、"验证测试是否通过" 或排查非 ASan 的 ci-test 失败时使用。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.9 KB |
| agents/openai.yaml | config | 279 B |
| references/BINDINGS-TEST.md | markdown | 3.0 KB |
| references/CONFIGURE-AND-BUILD.md | markdown | 4.1 KB |
| references/FAILURE-DIAGNOSIS.md | markdown | 1.4 KB |
| references/FULL-TEST.md | markdown | 1.7 KB |
| references/TARGETED-TEST.md | markdown | 1.5 KB |
references/FULL-TEST.md
View on GitHub# 完整单元测试
## Linux 与 macOS
```bash
REPO_ROOT="$(git rev-parse --show-toplevel)"
cd "$REPO_ROOT"
BUILD_DIR_REL=build-ai/skill_test
export PYTHONPYCACHEPREFIX="$REPO_ROOT/$BUILD_DIR_REL/__pycache__"
BUILD_DIR="$BUILD_DIR_REL" bash .github/scripts/run-posix-ci-tests.sh
```
POSIX runner 会设置 `VLINK_DDS_IP=127.0.0.1` 和平台动态库路径,启动并
清理 `vlink-proxy`,以默认 4 路并行、单 suite 180 秒超时运行 CTest,
并排除仓库固定的第三方测试。
## Windows
```powershell
$RepoRoot = git rev-parse --show-toplevel
Set-Location $RepoRoot
$BuildDirRel = "build-ai/skill_test"
$BuildDir = Join-Path $RepoRoot $BuildDirRel
$env:BUILD_DIR = $BuildDirRel
$env:PYTHONPYCACHEPREFIX = Join-Path $BuildDir "__pycache__"
$env:WINDOWS_CTEST_ALLOWED_FAILURES = "0"
& "$RepoRoot/.github/scripts/run-windows-ci-tests.ps1"
if ($LASTEXITCODE -ne 0) {
throw "Unit tests failed with exit code $LASTEXITCODE"
}
```
Windows runner 会补充运行库搜索路径,设置测试 IP,管理
`vlink-proxy.exe`,并采用与 POSIX 一致的并行度和超时。必须把
`WINDOWS_CTEST_ALLOWED_FAILURES` 设为 `0`,禁止继承外部非零值。
## 完整性判定
- `BUILD_DIR` 必须是 `build-ai/skill_test` 或其细分任务形式的仓库根相对路径,
并与配置、构建阶段的 `BUILD_DIR_REL` 或 `$BuildDirRel` 一致。
- `vlink-proxy` 缺失或提前退出属于测试链路失败,不得绕过。
- 只有 runner 正常结束且没有失败 suite 时,才能报告普通单元测试全量
通过。
- runner 将 `CMAKE_BUILD_PARALLEL_LEVEL` 仅作为 CTest 并行度;不要用它
控制编译。编译并行度必须在构建步骤按
[CONFIGURE-AND-BUILD.md](CONFIGURE-AND-BUILD.md) 显式传入。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |