tests/run_tests.sh builds small MIPS programs with clang that run in
place of the BIOS, and a headless libretro frontend that boots the core
with them:
- mdec: decodes macroblock streams through DMA in both channel orders,
24- and 15-bit, with and without AC coefficients, and through CPU reads,
and compares the output with tests/mdec_decode.expected.
- polyline: draws poly-lines longer than the core buffers, flat and
shaded, opaque and blended, and compares VRAM with
tests/gpu_polyline.expected.
- regfuzz: pokes the GPU, DMA, CD-ROM, SPU, MDEC, timer and SIO registers
with pseudo-random values, with a small disc inserted.
- statefuzz: loads corrupted save states into a fuzzed system.
The workflow runs them on a release build with every CPU mode, under
ASan and UBSan, and under TSan with the GPU and CD-ROM threads.