-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Emulator-based unit tests no longer work on Travis #371
Comments
so the temp workaround for this is to use an API Level < 23 ? |
I had different issues with API 22 - see OneBusAway/onebusaway-android#720 (comment). There is supposedly a fix now for newer APIs (see OneBusAway/onebusaway-android#720 (comment)) although I haven't had a chance to try it myself yet. |
Run into similar issue in travis ci and circle ci. I reported to https://issuetracker.google.com/issues/76200998. |
* -migrate to gradle; -remove android-studio, cukeulator-test, cucumber-android-test subpojects, #5 fix sample; -make compatible with cucumber 4.0.0 -#3 fix reported duration time * Make gradle script executable * Add gradle build dirs to .gitignore * Fix caching for gradle * Add android components for sdk 27 * Run unit tests before starting emulator * Try some stuff * Try more * More trying * Try louder * With more tools * Try this image * Jak shaving * Start the engines * Install more stuff * Work around * Downgrade target sdk to 24 * Run build as part of install * Back to 27 * gradle 4.10 * add clean before build * run tests with spoon * enable debug logging in spoon * specify android.components in .travis.yml * restore sdkmanager commands * specify build-tools and android-24 in android.components * try emulator for sdk 26 (googlemaps/android-maps-utils#371) * try emulator x86 * try emulator 21 arm * print error from logcat * adb logcat * added sdcard to emulator * specify emulator skin
The |
This seems to be a bug in travis. See here: googlemaps/android-maps-utils#371 Signed-off-by: Stefan Nussbaumer <st9fan@gmail.com>
This configuration change recently started working for GPSTest - we can give it a shot - barbeau/gpstest@e4d77bf. |
Does this also works for API above 18? @barbeau |
@mochadwi I don't know, I've only tested it on the API 18 emulator. Let me know if you try it! |
@mochadwi |
Awesome. After carefully considering the build speed on Travis, we choose using |
@mochadwi Sounds good. Depending on the complexity of your tests, emulator startup is one thing, and emulator performance is another. I have not tried to benchmark emulator performance. But here is my equivalent benchmark on startup time. |
* googleOrigin/master: (107 commits) Remove unnecessary interface method public modifiers. (googlemaps#587) Remove unnecessary primitives boxing. (googlemaps#586) Fix googlemaps#575 - Change Travis config, use matrix of API emulators (googlemaps#585) Retain the bitmap cache (googlemaps#381) Made GeoJsonParser with parseGeometry public to use the parser standalone. (googlemaps#492) Fix googlemaps#570 - Use project GitHub URL for remote KML loading demo (googlemaps#581) Bump Gradle plugin for Android Studio v3.5.2 (googlemaps#574) Fix googlemaps#575 - Use API 26 emulator instead of API 28 (googlemaps#576) Fix googlemaps#371 - Run emulator-based unit tests on Travis (googlemaps#573) Fix googlemaps#371 - Run emulator-based unit tests on Travis (googlemaps#573) Fix googlemaps#532 - Use ContextCompat to load drawable resources for scaling (googlemaps#571) Change test methods visibility (googlemaps#569) Release 0.6.2 (googlemaps#568) Demo clustering with ViewModel (googlemaps#506) Differentiate between initial start and configuration change restore (googlemaps#567) Fix wrapping around IDL (googlemaps#564) Update Gradle wrapper to 5.6.3 (googlemaps#566) Add MaxIntensity functionality for user defined intensities on HeatMapTiles (googlemaps#499) Use float zoom to calculate visible bounds (googlemaps#483) Remove apklib publishing (googlemaps#563) ... # Conflicts: # library/src/androidTest/java/com/google/maps/android/PolyUtilTest.java
The android emulator After reading this thread, I changed it to |
Summary:
There are issues with API Level 23-25 emulators that prevent them from running on Travis.
Here's an example of a failed build:
https://travis-ci.org/googlemaps/android-maps-utils/builds/206977302
Things go unresponsive with the recent master branch (as of 9be09a2). I've tried a number of resolutions in these branches/PRs (for this and another project):
...but so far no luck.
It seems to boil down to these two problems with the emulators/SDK:
@stephenmcd or @broady Any chance you can try to get the Android emulator/SDK team to take a look at the above? I'm not very familiar with how this is set up, but it may be a simple issue with the metadata associated with the SDK when fetched by something like Travis.
For now, as a workaround in PR #370, I've changed it to simply build the project, without spinning up an emulator and running the unit tests. This is obviously a huge inconvenience, as you still need to run the unit tests locally to verify that they pass.
Steps to reproduce:
Run a Travis build as of 9be09a2 in the master branch, with the
.travis.yml
config shown in https://github.com/googlemaps/android-maps-utils/blob/8f7d4b153d7281c818853474361914d3aefc0678/.travis.yml.Expected behavior:
Emulator image should be downloaded, started, and the unit tests should run via
./gradlew clean check connectedCheck -x library:signArchives -PdisablePreDex
.Observed behavior:
The emulator times out (or there is other behavior with missing ABIs, etc. depending on the API Level) - see https://travis-ci.org/googlemaps/android-maps-utils/builds/206977302 for an example, which shows:
Device and Android version:
Above example is using API Level 23 emulator - see https://github.com/googlemaps/android-maps-utils/blob/8f7d4b153d7281c818853474361914d3aefc0678/.travis.yml for exact config.
Screenshots:
N/A
The text was updated successfully, but these errors were encountered: