超时等待120秒模拟器启动

它看起来像Teamcity代理(TC版本是9.0 EAP)不能通过testingshell脚本运行iOS Simulator

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

生成日志错误:

 [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脚本进行testing:

 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" 

我也试过从这个问题的解决scheme,但它并没有帮助我。

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

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

可能会发生您的自定义脚本花费太长时间才能完成。 我能够通过在构build阶段添加一个自定义脚本来hibernate5000秒来复制这个问题。