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

查看:362
本文介绍了通过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"

更新8/02/2016 现在,此问题已在Xcode 7.2.1中修复(命令行工具"xcodebuild测试"将不再等待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天全站免登陆