-
Couldn't load subscription status.
- Fork 303
Replace Gradle-based Android testing with individual emulator executables #1639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: derselbst <[email protected]>
Co-authored-by: derselbst <[email protected]>
Co-authored-by: derselbst <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, ADB wait-for-device is waiting forever. I need to reproduce this locally, this may take some time...



Addresses #912 by implementing a new Android testing approach that eliminates the Gradle dependency and maintains individual test files for better maintainability.
Problem
The current Android CI pipeline used Gradle to compile all unit tests into a single shared library, which had several issues:
convert-tests.sh)Solution
This PR introduces a new emulator-based testing system that builds and executes individual test executables directly in the Android emulator via ADB:
Key Components
ADD_FLUID_ANDROID_TEST()that builds individual Android test executablesTechnical Implementation
test_snprintf_android)libfluidsynth-OBJand required dependencies (LIBFLUID_LIBS, Android log library)adb pushand executed withadb shellBenefits
Usage
Backward Compatibility
The legacy Gradle-based approach is still available via
-DENABLE_ANDROID_GRADLE_TESTS=ONfor compatibility, but the new emulator-based approach is now the default.Files Added/Modified
cmake_admin/FluidAndroidTest.cmake- CMake integration for Android teststest-android/run-emulator-tests.sh- Test execution enginetest-android/verify-setup.sh- Developer verification tooltest-android/README_emulator_testing.md- Comprehensive documentation.azure/azure-pipelines-android.yml- Updated CI pipelinetest/CMakeLists.txt- Added Android test targetsCMakeLists.txt- Made Gradle approach optionalThe solution is ready for immediate CI testing with both armv7a and aarch64 architectures and completely addresses the maintainability concerns raised in the original issue.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.