From 0ef0c703b6748a852c63e45f73ddfbe28b90c246 Mon Sep 17 00:00:00 2001 From: derselbst Date: Sun, 13 Jun 2021 13:14:50 +0200 Subject: [PATCH] minor fixes during Android testing --- test-android/README.md | 6 +++--- test-android/app/build.gradle | 4 ++-- test-android/convert-tests.sh | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test-android/README.md b/test-android/README.md index 713792e4..c7da4c00 100644 --- a/test-android/README.md +++ b/test-android/README.md @@ -13,8 +13,8 @@ The application was based on Android Studio 4.2 (when it was created). Here is a brief task list to generate, build, and run Android tests: - run `./convert-tests.sh` to generate runnable tests. -- run `./download.sh` to download fluidsynth dependency archives to build from sources as Android dependencies. -- run `./build-scripts/build-all-archs.sh` to build fluidsynth native libraries for Android. +- run `build-scripts/download.sh` to download fluidsynth dependency archives to build from sources as Android dependencies. +- run `build-scripts/build-all-archs.sh` to build fluidsynth native libraries for Android. - copy `build-scripts/build-artifacts/lib` contents into `app/src/main/jniLibs`. - run `./gradlew connectedCheck` to build and run Android tests. @@ -34,7 +34,7 @@ It will end up with `build-scripts/build-artifacts/` that contains a `include` d Once you have finished building fluidsynth for Android. there will be `$(topdir)/build_(ABI)` directories. While you want to build the Android tester app, you cannot remove them because those intermediate files (OBJ files) are referenced by this app's `CMakeLists.txt`. -(4) The `lib` part from the above has to be copied into `app/src/main/jniLibs`. There should be `armeabi-v7a`, `arm64-v8a`, `x86`, and `x86_64` subdirectories. (Note that the locations are different between local builds and Azure DevOps.) +(4) The `lib` part from the above has to be copied into `app/src/main/jniLibs`. There should be `armeabi-v7a`, `arm64-v8a`, `x86`, and `x86_64` subdirectories. (5) After all the steps above are done, the Android tester app is ready to build and run. You can either open this directory as a project on Android Studio, or run `./gradlew build` to build the app, or run `./gradlew connectedCheck` to build and run the tests on a connected Android target (emulator or device). You can also run the tests by simply launching the MainActivity as it run there before showing the UI. diff --git a/test-android/app/build.gradle b/test-android/app/build.gradle index 5c43f44c..2b77af02 100644 --- a/test-android/app/build.gradle +++ b/test-android/app/build.gradle @@ -39,7 +39,7 @@ android { externalNativeBuild { cmake { path file('src/main/cpp/CMakeLists.txt') - version '3.18.1' + version '3.16.0+' } } buildFeatures { @@ -57,4 +57,4 @@ dependencies { testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' -} \ No newline at end of file +} diff --git a/test-android/convert-tests.sh b/test-android/convert-tests.sh index 75970dc7..a51c056c 100644 --- a/test-android/convert-tests.sh +++ b/test-android/convert-tests.sh @@ -13,6 +13,7 @@ DISABLED_TESTS=(\ ) rm -f test-names.txt +mkdir -p app/src/main/cpp/tests/ for f in `grep -lR "int main(void)" ../test/ | sort` ; do export TESTMAINNAME=`echo $f | sed -e "s/\.\.\/test\/test_\(.*\).c$/\1/"`