Build TestMpegCsc on Android too, and say that it needs doing

The legacy Android build has a unit test executable of its own, so a new file in
unittest/ goes in three build files rather than the two the docs named. Missing
the Android one builds fine everywhere it is convenient to try and fails only on
Android CI, which is what happened here - so both AGENTS.md and building.md now
say three, and which one is easy to forget.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
Henrik RydgårdandClaude Opus 5 committed 2026-09-18 12:13:17 -06:00
1 parent 5c5c7dec86
commit f3b578bd53
3 files changed
+9 -3

No files matched your search

+4 -2
View File
@@ -111,8 +111,10 @@ python test.py -g --graphics=software
around a hundred failures that mean nothing is wrong. The only meaningful result is `0 tests failed`.
(The debug-CRT "Detected memory leaks!" dump after the summary line is normal, not a failure.)
New unit tests are added to `availableTests`; large ones go in their own file in `unittest/`, listed in
both CMakeLists.txt and the Visual Studio project.
New unit tests are added to `availableTests`; large ones go in their own file in `unittest/`, which has
to be listed in **three** build files, not two: `CMakeLists.txt`, `unittest/UnitTests.vcxproj` (and its
`.filters`), and `android/jni/Android.mk`, which builds a unit test executable of its own. Miss the last
one and it builds everywhere you can easily try it, and fails on Android CI.
## Multiplatform considerations
+1
View File
@@ -1060,6 +1060,7 @@ ifeq ($(UNITTEST),1)
$(SRC)/unittest/TestVFS.cpp \
$(SRC)/unittest/TestDemangle.cpp \
$(SRC)/unittest/TestLzrc.cpp \
$(SRC)/unittest/TestMpegCsc.cpp \
$(SRC)/unittest/TestZipSlip.cpp \
$(SRC)/unittest/UnitTest.cpp
+4 -1
View File
@@ -128,7 +128,10 @@ main functions (and also stub out most of the System_ functions as needed). Take
when making cross platform changes.
New unit tests are added by listing them in availableTests in unittest.cpp. If they are large, put them in
separate files in the unittest subdirectory. Remember to update both CMakeLists.txt and the visual studio project.
separate files in the unittest subdirectory. A new file has to be listed in three build files, not two:
`CMakeLists.txt`, `unittest/UnitTests.vcxproj` (and its `.filters`), and `android/jni/Android.mk`, which
builds a unit test executable of its own. The Android one is the easiest to forget, since missing it builds
fine everywhere you are likely to try it and only fails on Android CI.
A unit test is often the first thing to call a given function from outside its own .cpp, which makes the
`ppsspp_unittest` target in the legacy Android build (`android/jni/Android.mk`, see above) the strictest check