通过 SSH 在 Xcode 6 下运行 xcodebuild 测试时超时 [英] Timeout when running xcodebuild tests under Xcode 6 via SSH

查看:14
本文介绍了通过 SSH 在 Xcode 6 下运行 xcodebuild 测试时超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎在将 Xcode6 与 jenkins 集成时遇到问题,我目前有此设置并使用 Xcode 5.

I seem to be having issues with integrating Xcode6 with jenkins, I currently have this setup and working with Xcode 5.

通过 SSH 远程运行 xcode 6 时模拟器超时,当我在本地运行时它会成功.

With xcode 6 running remotely via SSH the simulator time-out, when I run locally it succeeds.

命令

xcodebuild -workspace PROJECTNAME.xcworkspace -scheme BGO_Tests -destination 'platform=iOS Simulator,name=iPhone 5s' -derivedDataPath ./Build clean test

xcodebuild -workspace PROJECTNAME.xcworkspace -scheme BGO_Tests -destination 'platform=iOS Simulator,name=iPhone 5s' -derivedDataPath ./Build clean test

2014-08-19 10:46:36.591 xcodebuild[33966:381f] iPhoneSimulator:超时等待 120 秒>模拟器启动,当前状态为 1.

2014-08-19 10:46:36.591 xcodebuild[33966:381f] iPhoneSimulator: Timed out waiting 120 seconds for >simulator to boot, current state is 1.

测试失败:测试目标 BGO_Tests 遇到错误(超时等待 120 秒模拟器启动,当前状态为 1

Testing failed: Test target BGO_Tests encountered an error (Timed out waiting 120 seconds for simulator to boot, current state is 1

使用最近的 Xcode 6 beta 6 测试

Tested with recent Xcode 6 beta 6

推荐答案

我终于找到了一个很好的简单解决方案.JNLP 导致我们的 jenkins 服务器出现许多问题.

I finally managed to find a good simple solution. JNLP was causing numerous issues with our jenkins server.

SSH 超时的解决方法,通过 https://corner.squareup.com/2015/07/ios-build-infrastructure.html

Mavericks (10.9) 和 Yosemite (10.10) 确定一个进程是否可以通过访问进程的父系访问可访问性挂钩.通过将 launchd 放在允许进程列表中,通过 SSH 或 Jenkins 启动的进程可以访问到整个系统的可访问性挂钩.为此,您可以根据此要点修改 TCC 数据库.需要重新启动才能使更改生效."

#!/bin/bash

# This will add lauchd to the list of allowed processes for accessibility access
sudo sqlite3 /Library/Application Support/com.apple.TCC/TCC.db "INSERT or REPLACE INTO access VALUES('kTCCServiceAccessibility','/sbin/launchd',1,1,1,NULL)"

# This outputs the rows in the TCC database
sudo sqlite3 /Library/Application Support/com.apple.TCC/TCC.db 'select * from access'

echo "Restart is required for these changes to take effect"

2016 年 8 月 2 日更新现在已在 Xcode 7.2.1 中修复此问题(命令行工具‘xcodebuild test’将不再因等待 Simulator.app 启动而超时")

Update 8/02/2016 This is now fixed in Xcode 7.2.1 ("Command line tool ‘xcodebuild test’ will no longer time out waiting for Simulator.app to launch")

这篇关于通过 SSH 在 Xcode 6 下运行 xcodebuild 测试时超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆