Testing
Tests are dev-build only. Targets are defined in tests/tests.cmake (included when BLUR_DEV=ON) and run with:
ctest --test-dir build # everythingctest --test-dir build -R race_feed # one testNew tests go in tests/tests.cmake; tests and tools never live in src/.
What’s covered
Section titled “What’s covered”| Area | Tests |
|---|---|
| Recompiler | recomp_ops (instruction families against native), recomp_eh (C++ EH), recomp_atomic (needs generated P-code) |
| Host layer | host_seh, host_sync, host_net, host_dsound, host_input: small guest exes from tests/guest run through blurhost_test |
| Renderer | d3d9metal_threads (functional + threading), shader_corpus, replay_smoke; opt in to TSan with -DD3D9METAL_TSAN=ON |
| Game-state feed | game_state, race_feed, hit_event, feed_schema (needs python jsonschema), state_ws, ws_tunnel, discord |
| Lua patches | loadout_patch |
| Online service | online_server (go test ./... in server/) |
| Boot | host_boot and host_boot_present_* boot the real game headless and need the generated code |
shader_corpus and replay_smoke read game-derived captures from the gitignored traces/ directory.
Guest test executables
Section titled “Guest test executables”tests/guest/*.c are our own Windows test programs, built with clang for i686 Windows and recompiled by
tools/recomp/build/gen_tests.sh into the committed tests/recomp/gen.cpp. Re-run it after editing the guest sources or
changing the emitter.
Server
Section titled “Server”cd server && go vet ./... && go test ./... is what CI runs (CI and releases).
cd website && npm ci && npm run build builds the site and checks internal links.