Tests¶
TL;DR. Host tests check the PICO 4's own code against fakes in seconds, with no hardware; formatting, lint,
types, C tests, shellcheck, links and private data run beside them, all in CI. The integration test is the installed
system on the headset (dev install, dev check, hardware-testing.md).
Levels¶
| Level | Command | Takes |
|---|---|---|
| Host tests: the PICO 4's protocols, validators, plans, hooks and words against fakes (overpressure's own tests cover the executor they run on) | python -m unittest discover -t . -s devices/phoenix/tests (python -m unittest: with the generic tests) |
seconds |
Formatting, lint and types (CI runs them; make lint runs them here and in every headset in devices/) |
uv run ruff format --check devices/phoenix, uv run ruff check devices/phoenix, uv run ty check devices/phoenix |
seconds |
| The host tests and every shell test above | make test (on Linux) |
seconds |
| The same on any host, in the build container, as root | overpressure container run -- make test (make container-test) |
as make test, once the image is built |
| C tests of this repository's own sources (CI runs them) | bash devices/phoenix/scripts/c-tests.sh (a C compiler) |
seconds |
| Shellcheck over every tracked shell script, down to warnings (CI runs it) | overpressure container run -- python3 scripts/run-shellcheck.py --repo devices/phoenix |
seconds |
| Links, private data (CI runs them) | python scripts/check-docs.py --repo devices/phoenix, python scripts/check-private.py --repo devices/phoenix --history |
seconds |
| On the headset: the integration test | overpressure dev install and dev check, on the installed system |
minutes; hardware-testing.md |
Optional: the recovery on a QEMU test kernel (from overpressure's tests/qemu/build-test-kernel.sh) |
tests/qemu/run-selftest.sh (make qemu-recovery) |
about 3 min |
CI (ci.yml) runs overpressure's checks of a headset repository
(headset-ci.yml), with the
pinned kernel release and its contracts: it also loads the headset as overpressure's own CI does
(overpressure devices), parses the PowerShell scripts on Windows and checks the workflows with a
pinned actionlint. Its job ci is the one required check: it passes when every check passed, or was
skipped because the same tree passed before against the same tree of overpressure's main.
New behaviour gets host tests with fakes for hardware and golden data for protocols, in the repository whose code it is: a test of overpressure's code (its roles, recovery client, adb and EDL steps, command lines, runner, look) goes to overpressure's tests, on generic fakes; this repository's check the PICO 4's own. The packages' tests (the driver's C protocol tests, the controller tracker's C++ tests) run inside their builds in overpressure/packages.