From 6375dccb060d6b104dcbbe38597a92bc5ba88cb9 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 5 Nov 2019 21:07:47 +0100 Subject: [PATCH] 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. --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 29047abdb..e34cb55eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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