gitlab-ci: only run Espresso tests if KVM is available

The emulators without KVM are just too slow to reliably run the Espresso
tests, at least with the timeouts that are set by default.
This commit is contained in:
Hans-Christoph Steiner 2019-11-05 21:07:47 +01:00
parent 4d28b52419
commit 6375dccb06
No known key found for this signature in database
GPG Key ID: 3E177817BA1B9BFA
1 changed files with 3 additions and 1 deletions

View File

@ -74,7 +74,9 @@ errorprone:
- wait-for-emulator
- adb devices
- adb shell input keyevent 82 &
- test $AVD_SDK -ge 25 || export FLAG=-Pandroid.testInstrumentationRunnerArguments.notAnnotation=android.support.test.filters.LargeTest
- if [ $AVD_SDK -lt 25 ] || ! emulator -accel-check; then
export FLAG=-Pandroid.testInstrumentationRunnerArguments.notAnnotation=android.support.test.filters.LargeTest;
fi
- ./gradlew connectedFullDebugAndroidTest $FLAG
|| ./gradlew connectedFullDebugAndroidTest $FLAG
|| ./gradlew connectedFullDebugAndroidTest $FLAG