等待120秒,模拟器启动

时间:2014-11-20 09:10:58

标签: ios xcode teamcity xcodebuild ocunit

看起来Teamcity代理(TC版本是9.0 EAP)无法通过测试shell脚本运行iOS Simulator

我正在使用Build Step: Command Line,它正在运行Custom Script并将params传递给它。 Teamcity代理在Mac OS X Yosemite 10.10上使用shell脚本../bin/mac.launchd.sh启动。

构建日志错误:

[12:33:24][Step 2/2] 2014-11-20 11:33:25.421 xcodebuild[28083:289783]  iPhoneSimulator: Timed out waiting 120 seconds for simulator to boot, current state is 1.
[12:33:24][Step 2/2] 
[12:33:24][Step 2/2] Testing failed:
[12:33:24][Step 2/2] Test target app-tests encountered an error (Timed out waiting 120 seconds for simulator to boot, current state is 1. If you believe this error represents a bug, please attach the log file at /var/folders/sz/1lfcb1354xggcnd04_9j5kc40000gp/T/com.apple.dt.XCTest-status/Session-2014-11-20_11:31:25-P1Pjwd.log)
[12:33:24][Step 2/2] ** TEST FAILED **

我的测试shell脚本:

xcodebuild \
    -sdk iphonesimulator8.1 \
    -destination "name=iPad Air,OS=8.1" \
    -configuration Debug \
    -project "$PROJECTPATH" \
    -scheme app-tests \
    CONFIGURATION_BUILD_DIR="$BUILDPATH" \
    clean test \
    | xcpretty -tc -r junit --output "$BUILDPATH/junit.xml"

我也试过这个question的解决方案,但它没有帮助我。

2 个答案:

答案 0 :(得分:0)

这已经在评论中得到了回答,这里也是苹果论坛的链接,AFAIK,它仍然是苹果改变它之前不可能的情况

https://devforums.apple.com/message/1040016#1040016

答案 1 :(得分:-2)

您的自定义脚本可能需要很长时间才能完成。通过在构建阶段添加自定义脚本来休眠5000秒,我能够复制此问题。