Skip to content

Instantly share code, notes, and snippets.

@alorma
Last active March 7, 2018 10:40
Show Gist options
  • Select an option

  • Save alorma/188cae0941aa19f9455afb87b89b94bc to your computer and use it in GitHub Desktop.

Select an option

Save alorma/188cae0941aa19f9455afb87b89b94bc to your computer and use it in GitHub Desktop.
#!/bin/sh
# Check if device is connected
if [[ $(adb get-state) ]]; then
# Run Android and jUnit tests
./gradlew clean testDebug connectedDebugAndroidTest
else
# Run jUnit tests
./gradlew clean testDebug
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment