【问题标题】:Xcode Server CI Bot Test Session exited(-1)Xcode Server CI Bot 测试会话已退出(-1)
【发布时间】:2015-05-26 08:23:04
【问题描述】:

尝试在 XcodeServer 上针对模拟器设备运行测试时出现错误。测试有时会通过一个设备而对另一个设备失败,但失败的设备并不总是同一个设备。这可以在单个会话中发生。

日志文件错误如下:

2015-03-23 10:44:11.029 Initializing test infrastructure.
2015-03-23 10:44:11.029 Writing testing status log to /Library/Developer/XcodeServer/Integrations/Integration-7e6e54f21a2fd25cddc9df0436cb3688/Session-2015-03-23_10:44:10-tH1BD4.log.
2015-03-23 10:44:28.676 Launch session started, setting a disallow-finish-token on the run operation.
2015-03-23 10:44:30.352 Adding console adaptor for test process.
2015-03-23 10:44:39.566 Creating the connection.
2015-03-23 10:44:39.567 Listening for proxy connection request from the test bundle (all platforms)
2015-03-23 10:44:39.567 Resuming the connection.
2015-03-23 10:44:39.567 Test connection requires daemon assistance.
2015-03-23 10:44:39.568 Checking test manager availability..., will wait up to 120s
2015-03-23 10:45:05.253 testmanagerd handled session request.
2015-03-23 10:45:05.254 Waiting for test process to check in..., will wait up to 120s
2015-03-23 10:46:47.578 Test operation failure: Test session exited(-1) without checking in.
2015-03-23 10:46:47.645 _finishWithError:Error Domain=IDEUnitTestsOperationsObserverErrorDomain Code=3 "Test session exited(-1) without checking in." UserInfo=0x7f8be43e40c0 {NSLocalizedDescription=Test session exited(-1) without checking in.} didCancel: 1

任何想法都会很有帮助。

【问题讨论】:

  • 您找到解决方案了吗?我也遇到了同样的问题,找不到任何信息日志
  • 并非如此。它已经停止发生,但我无法解释原因。我们升级到最新版本的 Xcode 和 OS X Server,并确保我们实施了拆卸,以防出现问题。到目前为止一切正常。

标签: ios continuous-integration bots xcode-server


【解决方案1】:

尝试在服务器上启动此命令:

sudo /usr/sbin/DevToolsSecurity --enable

some more details in this answer

【讨论】:

    【解决方案2】:

    模拟器需要用户 GUI 上下文才能运行。如果服务器是从 /Library/LaunchDaemons 启动的,那么它在系统(根)上下文中运行并且没有 GUI 上下文。如果使用 Atlassian Bamboo as well as Jenkins for CI,这是一个问题。 Facebook 开发人员有also encountered this problem with xctool

    您可能需要从用户上下文启动 XcodeServer,即在 ~/Library/LaunchAgents 中创建一个 plist 文件,并让该用户持续登录。我认为 Apple 会在安装过程中解决这个问题。

    【讨论】:

    • 并检查 LaunchAgents 是否允许它在 GUI 会话中实际运行。我将<key>LimitLoadToSessionType</key><string>Aqua</string> 添加到该launchd.plist 并让它工作!
    猜你喜欢
    • 2015-10-07
    • 1970-01-01
    • 2019-02-17
    • 1970-01-01
    • 1970-01-01
    • 2016-09-04
    • 2017-04-27
    • 2017-02-27
    • 1970-01-01
    相关资源
    最近更新 更多