【问题标题】:xcodebuild builds test target but cannot run xctestxcodebuild 构建测试目标但无法运行 xctest
【发布时间】:2014-02-01 12:25:27
【问题描述】:

我在终端运行命令

sudo /usr/bin/xcodebuild -project awesome.xcodeproj -scheme "AwesomeTests" 
-configuration Production test -derivedDataPath ~/Documents/buildData
-sdk "OS X 10.9"

最后几行输出的样子

error: failed to launch '/Applications/Xcode.app/Contents/Developer/usr/bin/xctest'
-- error: Host::LaunchProcess (launch_info) => pid=0,
path='/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver'
err = Problems with launching via XPC. XPC error : Connection interrupted (0x00000005)
** TEST SUCCEEDED **

在输出这些行之前,系统提示我:“xcodebuild 正在尝试控制根进程。输入您的密码以允许此操作”

我使用的是 Xcode 5.0.2。

【问题讨论】:

  • 你为什么首先使用sudo
  • 哇,删除sudo 部分解开了谜团。谢谢你,@trojanfoe

标签: xcodebuild xctest xpc


【解决方案1】:

正如@trojanfoe 所说,sudo 是导致错误的原因。

似乎~/Documents/buildData 文件夹是使用root 权限创建的,无法从xtest 访问。

【讨论】:

    猜你喜欢
    • 2015-01-30
    • 1970-01-01
    • 2013-08-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-18
    • 1970-01-01
    • 2022-08-04
    相关资源
    最近更新 更多