Prechádzať zdrojové kódy

Merge pull request #277 from nextcloud/update-docker-container

Update docker container
Andy Scherzinger 8 rokov pred
rodič
commit
f3fd4c70a2
2 zmenil súbory, kde vykonal 10 pridanie a 5 odobranie
  1. 3 3
      .drone.yml
  2. 7 2
      wait_for_emulator.sh

+ 3 - 3
.drone.yml

@@ -1,9 +1,9 @@
 pipeline:
 pipeline:
   test:
   test:
-    image: nextcloudci/android:android-2
+    image: nextcloudci/android:android-7
     commands:
     commands:
       - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 20M
       - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI -c 20M
-      - emulator -avd test -no-skin -no-audio -no-window &
+      - emulator -avd test -no-window &
       - ./wait_for_emulator.sh
       - ./wait_for_emulator.sh
       # build app and assemble APK, in debug mode
       # build app and assemble APK, in debug mode
       - ./gradlew assembleDebug
       - ./gradlew assembleDebug
@@ -19,6 +19,6 @@ pipeline:
       #- adb shell am instrument -w -e debug false -e class com.owncloud.android.datamodel.OCFileUnitTest com.owncloud.android.test/android.support.test.runner.AndroidJUnitRunner
       #- adb shell am instrument -w -e debug false -e class com.owncloud.android.datamodel.OCFileUnitTest com.owncloud.android.test/android.support.test.runner.AndroidJUnitRunner
 
 
     environment:
     environment:
-      - ANDROID_TARGET=android-23
+      - ANDROID_TARGET=android-24
       - ANDROID_ABI=armeabi-v7a
       - ANDROID_ABI=armeabi-v7a
       - LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:/opt/android-sdk-linux/tools/lib64/gles_mesa/
       - LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:/opt/android-sdk-linux/tools/lib64/gles_mesa/

+ 7 - 2
wait_for_emulator.sh

@@ -1,14 +1,17 @@
 #!/bin/bash
 #!/bin/bash
 
 
+# Originally written by Ralf Kistner <ralf@embarkmobile.com>, but placed in the public domain
+
 bootanim=""
 bootanim=""
 failcounter=0
 failcounter=0
 checkcounter=0
 checkcounter=0
+
 until [[ "$bootanim" =~ "stopped" ]]; do
 until [[ "$bootanim" =~ "stopped" ]]; do
    bootanim=`adb -e shell getprop init.svc.bootanim 2>&1`
    bootanim=`adb -e shell getprop init.svc.bootanim 2>&1`
    echo "($checkcounter) $bootanim"
    echo "($checkcounter) $bootanim"
    if [[ "$bootanim" =~ "not found" ]]; then
    if [[ "$bootanim" =~ "not found" ]]; then
       let "failcounter += 1"
       let "failcounter += 1"
-      if [[ $failcounter -gt 30 ]]; then
+      if [[ $failcounter -gt 3 ]]; then
         echo "Failed to start emulator"
         echo "Failed to start emulator"
         exit 1
         exit 1
       fi
       fi
@@ -16,4 +19,6 @@ until [[ "$bootanim" =~ "stopped" ]]; do
    let "checkcounter += 1"
    let "checkcounter += 1"
    sleep 10
    sleep 10
 done
 done
-echo "Done"
+echo "($checkcounter) Done"
+adb -e shell input keyevent 82
+echo "($checkcounter) Unlocked emulator screen"