一键导入
check
Build and run ArduPilot unit tests. Use when the user asks to run tests, check tests, or verify code changes with tests.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Build and run ArduPilot unit tests. Use when the user asks to run tests, check tests, or verify code changes with tests.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Review an ArduPilot new-board hwdef PR. Stashes any local changes, checks the PR out as a branch in the current repo, runs DMA / board-ID / file-presence / commit-structure checks, layers the hwdef playbook on top, and (after confirmation) posts a review comment on the PR — then restores the original branch and pops the stash. Use when the user asks to review or pre-review an hwdef PR.
Review an ArduPilot new-board hwdef PR. Stashes any local changes, checks the PR out as a branch in the current repo, runs DMA / board-ID / file-presence / commit-structure checks, layers the hwdef playbook on top, and (after confirmation) posts a review comment on the PR — then restores the original branch and pops the stash. Use when the user asks to review or pre-review an hwdef PR.
Analyze ArduPilot DataFlash .bin log files or MAVLink .tlog telemetry logs. Use when the user provides a .bin or .tlog log file path or asks to analyze flight log data.
Analyze ArduPilot DataFlash .bin log files or MAVLink .tlog telemetry logs. Use when the user provides a .bin or .tlog log file path or asks to analyze flight log data.
Check the local ArduPilot AI Playbook version against the upstream GitHub version and update if newer. Use when the user asks to update the playbooks, check for playbook updates, or wants to know which version is installed.
Write ArduPilot CRSF (Crossfire) menu scripts using crsf_helper.lua. Use when the user asks to create or modify CRSF/ELRS transmitter menus.
| name | check |
| description | Build and run ArduPilot unit tests. Use when the user asks to run tests, check tests, or verify code changes with tests. |
| argument-hint | [test_name] |
| disable-model-invocation | true |
| allowed-tools | Bash(./waf *), Bash(./build/*), Read, Grep, Glob |
Unit tests use Google Test framework. They require SITL board configuration.
./waf configure --board sitl
If $ARGUMENTS specifies a test name:
# Build specific test
./waf --targets tests/$ARGUMENTS
# Run it
./build/sitl/tests/$ARGUMENTS
If no arguments, run all changed tests:
./waf check
Or to run ALL tests:
./waf check-all
Tests are in libraries/*/tests/. Common ones:
| Test | Library | What it tests |
|---|---|---|
test_math | AP_Math | Vector, matrix, quaternion math |
test_rotation | AP_Math | Rotation matrices and conversions |
test_polygon | AP_Math | Polygon inclusion/exclusion |
test_euler | AP_Math | Euler angle conversions |
test_filter | Filter | Low-pass, notch filters |
test_bitmask | AP_Common | Bitmask operations |
test_fence | AC_Fence | Geofence logic |
test_mission | AP_Mission | Mission item handling |
To list all available tests:
find libraries -name "test_*.cpp" -path "*/tests/*" | sed 's|.*/tests/||;s|\.cpp||' | sort
Tests follow Google Test patterns:
TEST(MathTest, VectorLength)
{
Vector3f v(1, 0, 0);
EXPECT_FLOAT_EQ(v.length(), 1.0f);
}
Test files go in libraries/<LIB>/tests/test_<name>.cpp.