Skip to content

Commit 6b90948

Browse files
Running tests 1 by 1 on each device, trying to avoid weird 'com.android.ddmlib.InstallException: device not found'
1 parent 0706180 commit 6b90948

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

runTests.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
function create_emulator() {
3+
function run_test() {
44
abi=$1
55
api_level=$2
66
port1=$3
@@ -9,15 +9,18 @@ function create_emulator() {
99
emulator_serial="emulator-${port1}"
1010
echo no | android create avd -c 50M --force -n $emulator_name -t ${api_level} --abi ${abi}
1111
emulator -ports ${port1},${port2} -partition-size 256 -avd $emulator_name -no-skin -no-boot-anim -no-audio -no-window -gpu on &
12+
EMU_PID=$!
1213
./wait_for_emulator ${emulator_serial} || exit 1
1314
adb -s ${emulator_serial} shell input keyevent 82 &
15+
kill -9 $EMU_PID
16+
17+
# Running Tests
18+
./gradlew --info clean build connectedCheck || exit 1
1419
}
1520

16-
# x86 emulator android-16
17-
create_emulator x86 android-16 5554 5555
21+
# x86 android-16
22+
run_test x86 android-16 5554 5555
1823

19-
# armeabi-v7a emulator android-16
20-
create_emulator armeabi-v7a android-16 5556 5557
24+
# armeabi-v7a android-16
25+
run_test armeabi-v7a android-16 5556 5557
2126

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

0 commit comments

Comments
 (0)