Skip to content

Instantly share code, notes, and snippets.

@baz8080
Created May 12, 2017 10:21
Show Gist options
  • Save baz8080/ee031f2e40c7fcb62c1ba8cc1c21de94 to your computer and use it in GitHub Desktop.
Save baz8080/ee031f2e40c7fcb62c1ba8cc1c21de94 to your computer and use it in GitHub Desktop.
Travis instrumentation test snippet
# We can build this part of the instrumentation tests before we need the emulator
./gradlew --settings-file settings_only_providers.gradle assembleDebug assembleDebugAndroidTest
# Now we absolutely need the emulator, so we check to see if we are on travis,
# and then we wait for it to start.
which android-wait-for-emulator > /dev/null
if [ "$?" -eq 0 ]; then
echo "Waiting for emulator..."
android-wait-for-emulator
fi
# Run the instrumentation tests
./gradlew --settings-file settings_only_providers.gradle connectedAndroidTest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment