Skip to content

Commit

Permalink
switched to multiple simultanious targets and better skinning for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Jurczok committed Jan 21, 2016
1 parent 602b6a8 commit 12dad7d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ cache: false
sudo: false

before_script:
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-audio -no-window -gpu off &
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI --skin WXGA720
- emulator -avd test -no-audio -no-window -gpu off &
- android-wait-for-emulator
- adb shell input keyevent 82 &

Expand Down
20 changes: 20 additions & 0 deletions app/adb_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
# Script adb+
# Usage
# You can run any command adb provides on all your currently connected devices
# ./adb+ <command> is the equivalent of ./adb -s <serial number> <command>
#
# Examples
# ./adb+ version
# ./adb+ install apidemo.apk
# ./adb+ uninstall com.example.android.apis

adb devices | while read line
do
if [ ! "$line" = "" ] && [ `echo $line | awk '{print $2}'` = "device" ]
then
device=`echo $line | awk '{print $1}'`
echo "$device $@ ..."
adb -s $device $@
fi
done
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ coveralls {
}

task grantAnimationPermission(type: Exec, dependsOn: 'installDebug') {
commandLine "adb shell pm grant org.linesofcode.alltrack android.permission.SET_ANIMATION_SCALE".split(' ')
commandLine "./adb_all.sh shell pm grant org.linesofcode.alltrack android.permission.SET_ANIMATION_SCALE".split(' ')
}

tasks.whenTaskAdded { task ->
Expand Down

0 comments on commit 12dad7d

Please sign in to comment.