The repository separates fast host checks from behavior that only real PS5 hardware can prove.
| Command | Scope |
|---|---|
make test-deps |
Fetch and verify the pinned host-only GoogleTest source. |
make test-unit |
Compile and run the host-native GoogleTest application tests. |
make test-integration |
Exercise repository scripts through subprocesses and temporary files. |
make test |
Run renderer, Python tooling, and terminal/input/service suites. |
make check |
Run linting, all host tests, and a complete folder build. |
The host-tests.yml workflow is configured to run make test on Ubuntu 24.04
with Clang 18. Adding this workflow is not evidence of a completed CI run. Host tests must remain deterministic, must never contact a console,
and must be safe to run in parallel with unrelated console work. The first
unit-test run downloads a pinned GoogleTest archive after verifying its
SHA-256; later runs reuse .deps/test/.
The real guest suites boot the bundled Linux images under sanitizers, with local fixtures only. They need no console or Internet access, and they are not hardware proof:
python3 -m tools.dev.build_embedded_runtime --sanitize --output build/runtime
python3 -m tools.dev.test_modern_guest --runtime build/runtime --images assets/linux --output build/modern
python3 -m tools.dev.test_network_guest --runtime build/runtime --images assets/linux --output build/network
python3 -m tools.dev.test_guest_bridge --runtime build/runtime --images assets/linux --output build/bridge
python3 -m tools.dev.test_shared_guest --runtime build/runtime --images assets/linux --output build/sharedtools/build-owned-ssh-host.py needs Python 3.12 or newer. Run the suites in
tests/ssh afterwards with Paramiko 4.0.0 installed.
make test-terminal also runs on macOS with Apple Clang. Set HOST_CXX and
HOST_CC to select compilers, and TEST_OUTPUT_DIR to isolate its binaries
(default build/tests). Linux uses linker section GC; macOS uses dead stripping.
Run one test or suite with normal GoogleTest arguments:
make test-unit GTEST_ARGS='--gtest_filter=AssetTextTest.MissingAssetUsesFallback'Write unit tests for reusable logic with meaningful behavior: parsers, state transitions, bounds handling, input mapping, protocol messages, resource ownership, and error paths. Keep platform calls behind a small boundary so the logic can compile and run on Linux without a PS5 or proprietary SDK.
The starter suite in tests/test_demo_renderer.cpp uses GoogleTest to validate
fallback, line-ending, truncation, and null-termination behavior for packaged
text assets. GoogleTest is a host-only development dependency: it is never
compiled into eboot.bin, libc.prx, or a PS5 package.
Do not add tests for trivial constants or one-line drawing calls merely to increase a coverage percentage. Test observable contracts and regressions.
tests/test_tools.py invokes complete repository scripts with temporary input
and controlled environment variables. Use this level for metadata updates,
build orchestration, package validation, and deployment resolution. Network
operations must be mocked or use an explicit dry-run mode; host CI must never
contact a console.
Each test must clean up its files, avoid shared mutable state, and include the failure case that would have caught the associated bug.
Rendering, controller input, AudioOut, mounted paths, launch/closure behavior, and firmware compatibility require hardware validation. A passing host suite does not prove those properties.
For a hardware milestone:
- Build an exact candidate from a clean commit and record its digest.
- Acquire the shared console lock only for the test window.
- Deploy the title through the documented LAN-only procedure.
- Capture the expected visual result and relevant logs.
- Close the title, release the lock, and record firmware, loader, result, and artifact identity.
- Commit the validation record separately from the implementation when the project workflow requires one.
Follow Deployment and the separate PS5 Homebrew Development Protocol for console coordination, evidence collection, and milestone policy.
- Add GoogleTest cases to C++ files under
tests/; thetest-unitrecipe owns their host-only compilation. - Add Python subprocess tests as
tests/test_*.py; discovery is automatic. - Preserve the GPL header on every test source.
- Run
make test,make lint, andmakebefore submitting a change. - Reserve real-console claims for recorded hardware results.