Skip to content

Instantly share code, notes, and snippets.

@andaag
Created March 19, 2015 08:18
Show Gist options
  • Save andaag/2803af6f7f69548345ff to your computer and use it in GitHub Desktop.
Save andaag/2803af6f7f69548345ff to your computer and use it in GitHub Desktop.
#!/bin/bash
DEVICES=$(adb devices | egrep -v 'List of devices' | cut -f 1 | xargs echo)
IFS=' '
echo "Installing emulator hacks"
for DEVICE in $DEVICES; do
adb -s $DEVICE uninstall no.finn.android.ci &>/dev/null
adb -s $DEVICE install -r "src/main/resources/android_emulator_hacks.apk" || exit 1
adb -s $DEVICE shell pm grant no.finn.android_emulator_hacks android.permission.SET_ANIMATION_SCALE
adb -s $DEVICE shell am start -n no.finn.android_emulator_hacks/no.finn.android_emulator_hacks.HackActivity
adb -s $DEVICE shell setprop debug.assert 1
done
echo "DONE"
#./gradlew --info spoon | tee test.log # https://github.com/square/spoon/issues/135
./gradlew connectedAndroidTest | tee test.log || echo "TEST FAILURE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment