swift - 将 Swift 单元测试添加到项目时,构建操作失败但未指定任何错误

标签 swift unit-testing

我目前正在开发一个 Objective C 项目,我们正在尝试将 Swift 合并到该项目中。当我向项目添加 Swift 单元测试时,我得到以下提示:

enter image description here

我创建了桥接头。但是,当我尝试运行我的测试时,我不断收到以下错误:

Build operation failed without specifying any errors. Individual build tasks may have failed for unknown reasons. One possible cause is if there are too many (possibly zombie) processes; in this case, rebooting may fix the problem. Some individual build task failures (up to 12) may be listed below.

我用谷歌搜索了这个错误,大多数人说重启模拟器、xcode、你的机器等等。我已经完成了所有这些。问题似乎出在我的单元测试中使用 swift。

有什么想法吗?

最佳答案

尝试将您的项目移动到离您的根目录更近的位置。 Swift 编译器在大型项目中可能无法达到 ARG_MAX。

https://forums.swift.org/t/swift-compilation-reaching-arg-max-limit-causing-xcode-build-failure/6494

关于swift - 将 Swift 单元测试添加到项目时,构建操作失败但未指定任何错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40924628/

相关文章:

ios - 如何摆脱 UIWebview 中的 adjustedContentInset?

ios - 禁用通知时,未在前台调用 didreceiveremotenotification

c# - 使用第三方对象实例化测试代码

c# - VS2008 : File creation fails randomly in unit testing?

unit-testing - 如何在Visual Studio 2017中禁用测试发现?

java - 使用 Mockito 模拟 Jersey 客户端 ClientResponse

ios - Swift 中的容器 View 边界问题

ios - Swift SVG 填充颜色到 SVG 图像

swift - FirebaseCore 词法或预处理器问题

java - 如何使用 junit 测试 log4j 记录了警告?