run-tests
Compile and run the PhoenixSketch unit tests under code/test using CMake + Google Test. Use when the user asks to run, build, or check the unit tests / ctest / Google Test suite for the radio firmware
SKILL.md.claude/skills/run-tests/SKILL.md
GitHubrun-tests
Builds and runs the host-side unit tests in code/test/ using CMake and ctest. The tests use mocked Arduino/hardware interfaces and run on the development machine — they do not touch the Teensy.
| Setting | Value |
|---|---|
| Source dir | code/test/ |
| Build dir | code/test/build/ |
| Test runner | ctest (Google Test discovered via CMake) |
Steps
Ensure the build directory exists. If
code/test/build/is missing, create it. If the user passedclean, remove it first and recreate.mkdir -p code/test/buildConfigure (if needed). From
code/test/build/, run cmake. CMake re-configures itself on subsequent runs as needed, so it's safe to run unconditionally:cmake ..Build. From
code/test/build/:makeBuilds can take a while on a clean tree; use a generous Bash timeout (e.g. 600000 ms). If the build fails, surface the first error and stop — do not run tests on a broken build.
Run tests. From
code/test/build/:ctest --output-on-failureAdd
-R <pattern>if the user passed a filter arg, and-Vif they passedverbose.Report. Summarise in 1–2 lines: how many tests passed/failed, and the names of any failing tests. If a specific filter was used, mention what it matched.
Args
clean— wipecode/test/build/and reconfigure from scratch before building. Use when CMake state seems stale or the user explicitly asks for a clean build.verbose— pass-Vto ctest so individual test output is shown even on success.- Any other arg — treat as a ctest
-Rregex filter (e.g.RFBoardrunsctest -R RFBoard --output-on-failure). Multiple words can be combined into one regex with|.
clean and verbose may be combined with a filter arg.
Notes
- Always run from
code/test/build/once it exists — relative paths inCMakeLists.txtassume that. - This skill is for host unit tests only. To build/flash the firmware itself, use the
flash-radioskill instead. - The CMake test build lives under
code/test/build/; the firmware build artifacts (code/build/,ArduinoOutput/) are unrelated and should not be touched here.