【发布时间】:2015-01-18 01:55:57
【问题描述】:
Teamcity 代理(TC 版本为 9.0 EAP)似乎无法通过测试 shell 脚本运行 iOS Simulator。
我正在使用Build Step: Command Line,它运行Custom Script 并将参数传递给它。 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 的解决方案,但它没有帮助我。
【问题讨论】:
-
当我使用 Build Step: Xcode Project 我收到同样的错误:
iPhoneSimulator: Could not launch simulator: -10810. Timed out waiting 120 seconds for simulator to boot, current state is 1. ** TEST FAILED ** -
我在 JetBrains 论坛上开启了讨论:devnet.jetbrains.com/message/5529292#5529292
-
我的经验是代理必须通过真正的桌面会话启动(即不通过 SSH,我猜通过 launchd 启动可能类似于 SSH)。否则,与 iOS 模拟器的交互无论如何都无法进行。
标签: ios xcode teamcity xcodebuild ocunit