mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-05-31 09:11:10 +00:00
Convert ctests into another test sources that can be compiled in Android test.
The existing ctests cannot be simply used in Android tests because everything is compiled as standalone executable with `main()` function. Since Android 11+ does not support standalone executables, those test `main()` functions are converted as unique functions and then picked up in this test's native-lib CMakeLists.txt. Since those tests depend on libfluidsynth internals, we cannot simply link with libfluidsynth.so. We instead compile the library with OBJ files.
This commit is contained in:
parent
962a544d15
commit
12cc9ed74b
4 changed files with 34 additions and 35 deletions
4
test-android/convert-tests.sh
Normal file
4
test-android/convert-tests.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
for f in `grep -lR "int main(void)" ../test/` ; do export TESTMAINNAME=`echo $f | sed -e "s/\.\.\/test\/test_\(.*\).c$/\1/"` && sed -e "s/int main(void)/int "$TESTMAINNAME"_main(void)/" $f > app/src/main/cpp/tests/test_$TESTMAINNAME.c ; done
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue