2014-10-30 20 views
6

Projemizi Travis CI üzerinde & test etmeye çalışıyorum. Tüm depolarımda her defasında aynı tekrarlanan çıktıyı gösteriyor.Travis-CI Gradle ile Android testler zaman aşımına uğradı

İşte https://github.com/carts-uiet/cartsbusboarding/blob/master/.travis.yml

language: android 
    android: 
    components: 
    # Uncomment the lines below if you want to 
    # use the latest revision of Android SDK Tools 
    # - platform-tools 
    # - tools 
    # The BuildTools version used by your project 
    - build-tools-21.0.0 
    # The SDK version used to compile your project 
    - android-21 
    # Additional components 
    - add-on 
    - extra 
    # Specify at least one system image, 
    # if you need to run emulator(s) during your tests 
    - sys-img-armeabi-v7a-android-21 
    # Emulator Management: Create, Start and Wait 
    before_script: 
    - echo no | android create avd --force -n test -t android-21 --abi armeabi-v7a 
    - emulator -avd test -no-skin -no-audio -no-window & 
    - android-wait-for-emulator 
    - adb shell input keyevent 82 & 

İşte Tüm bu zaman aşımı oluşturur https://travis-ci.org/carts-uiet/cartsbusboarding/builds/39447907

$ javac -version 
javac 1.7.0_60 
before_script.1 
3.53s$ echo no | android create avd --force -n test -t android-21 --abi armeabi-v7a 
Android 5.0 is a basic Android platform. 
Do you wish to create a custom hardware profile [no]Created AVD 'test' based on Android 5.0, ARM (armeabi-v7a) processor, 
with the following hardware config: 
hw.cpu.model=cortex-a8 
hw.lcd.density=240 
hw.ramSize=512 
vm.heapSize=48 
before_script.2 
0.01s 
$ emulator -avd test -no-skin -no-audio -no-window & 
$ android-wait-for-emulator 
Failed to Initialize backend EGL display 
emulator: WARNING: Could not initialize OpenglES emulation, using software renderer. 
error: device offline 
error: device offline 
* daemon not running. starting it now on port 5037 * 
* daemon started successfully * 
error: device offline 
error: device offline 
running 
running 
running 
running 
running 
running 

böyle bir build benim travis.yml olduğunu.

Burada yanlış olan ne yapıyorum?

cevap

2

Güncelleme yanıtı: VM görüntüleri zaten bu sorunu çözerek sabit android-bekle-öykünme komut dosyası ve android SDK araçları sürüm 24.0.0 içerir. Eski yanıtımı ve geçici çözümümü sildim.

benim daha önce komut dosyasına bu eklendi:

Build Environment Updates - 2014-12-09

+0

Çok teşekkürler @Ardok Sen karşılama, çözüm yakında –

+0

https :) hayat kurtarıcı konum: // android-review.googlesource.com/#/c/112780/ – albodelu

+0

Yeni android-for-for-emulator düzeltildi, onu kullanmayı deneyebilirsiniz. Yanıtı güncelliyorum. – albodelu

1

Bu script son sürümünü almak için en iyi alternatif gibi geliyor son senaryoya

# Emulator Management: Create, Start and Wait 
before_script: 
    - echo no | android create avd --force -n test -t android-21 --abi armeabi-v7a 
    - emulator -avd test -no-skin -no-audio -no-window & 
    - curl http://is.gd/android_wait_for_emulator > android-wait-for-emulator 
    - chmod u+x android-wait-for-emulator 
    - ./android-wait-for-emulator 
    - adb shell input keyevent 82 & 

url noktaları github üzerinde kullanılabilir.

Bu yardımcı olur umarım. . .

Sen Travis yapı talimat gerekiyor
+0

artık çalışmıyor (url 404 değerini döndürür) – spy

1

aslında birim testler:

# run tests against the emulator 
- ./gradlew connectedAndroidTest 
# run tests against the JVM 
- ./gradlew test 
İlgili konular