Skip to content

Commit

Permalink
Running tests 1 by 1 on each device, trying to avoid weird 'com.andro…
Browse files Browse the repository at this point in the history
…id.ddmlib.InstallException: device not found'
  • Loading branch information
hiteshsondhi88 committed Sep 19, 2014
1 parent 0706180 commit 6b90948
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions runTests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

function create_emulator() {
function run_test() {
abi=$1
api_level=$2
port1=$3
Expand All @@ -9,15 +9,18 @@ function create_emulator() {
emulator_serial="emulator-${port1}"
echo no | android create avd -c 50M --force -n $emulator_name -t ${api_level} --abi ${abi}
emulator -ports ${port1},${port2} -partition-size 256 -avd $emulator_name -no-skin -no-boot-anim -no-audio -no-window -gpu on &
EMU_PID=$!
./wait_for_emulator ${emulator_serial} || exit 1
adb -s ${emulator_serial} shell input keyevent 82 &
kill -9 $EMU_PID

# Running Tests
./gradlew --info clean build connectedCheck || exit 1
}

# x86 emulator android-16
create_emulator x86 android-16 5554 5555
# x86 android-16
run_test x86 android-16 5554 5555

# armeabi-v7a emulator android-16
create_emulator armeabi-v7a android-16 5556 5557
# armeabi-v7a android-16
run_test armeabi-v7a android-16 5556 5557

# Running Tests
./gradlew --info clean build connectedCheck || exit 1

0 comments on commit 6b90948

Please sign in to comment.