forked from hush/SilentDragonAndroid-old
Yusuf Sahin HAMZA
4 years ago
2 changed files with 50 additions and 4 deletions
@ -1,7 +1,28 @@ |
|||||
language: android |
language: android |
||||
dist: trusty |
|
||||
|
jdk: oraclejdk8 |
||||
|
|
||||
|
env: |
||||
|
global: |
||||
|
- ANDROID_TARGET=android-22 |
||||
|
- ANDROID_ABI=armeabi-v7a |
||||
|
|
||||
android: |
android: |
||||
components: |
components: |
||||
- build-tools-26.0.2 |
- tools |
||||
- android-26 |
- platform-tools |
||||
- extra |
- build-tools-28.0.3 |
||||
|
- android-28 |
||||
|
- $ANDROID_TARGET |
||||
|
- extra-android-m2repository |
||||
|
- sys-img-${ANDROID_ABI}-${ANDROID_TARGET} |
||||
|
|
||||
|
before_script: |
||||
|
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 100M |
||||
|
- emulator -avd test -no-window & |
||||
|
- bash ./tools/android-wait-for-emulator.sh |
||||
|
- adb shell input keyevent 82 & |
||||
|
|
||||
|
script: |
||||
|
- bash ./gradlew build |
||||
|
- bash ./gradlew test -x lint --stacktrace |
||||
|
@ -0,0 +1,25 @@ |
|||||
|
#!/bin/bash |
||||
|
|
||||
|
# Originally written by Ralf Kistner <ralf@embarkmobile.com>, but placed in the public domain |
||||
|
|
||||
|
set +e |
||||
|
|
||||
|
bootanim="" |
||||
|
failcounter=0 |
||||
|
timeout_in_sec=360 |
||||
|
|
||||
|
until [[ "$bootanim" =~ "stopped" ]]; do |
||||
|
bootanim=`adb -e shell getprop init.svc.bootanim 2>&1 &` |
||||
|
if [[ "$bootanim" =~ "device not found" || "$bootanim" =~ "device offline" |
||||
|
|| "$bootanim" =~ "running" ]]; then |
||||
|
let "failcounter += 1" |
||||
|
echo "Waiting for emulator to start" |
||||
|
if [[ $failcounter -gt timeout_in_sec ]]; then |
||||
|
echo "Timeout ($timeout_in_sec seconds) reached; failed to start emulator" |
||||
|
exit 1 |
||||
|
fi |
||||
|
fi |
||||
|
sleep 1 |
||||
|
done |
||||
|
|
||||
|
echo "Emulator is ready" |
Loading…
Reference in new issue