XCode 从 3.2.3 升级到 3.2.4 后,单元测试不再起作用
我刚刚将 XCode 更新到 3.2.4,结果发现我的单元测试不再起作用。我已经按照 来自 Scott Densmore 的说明,以便我能够调试我的测试。
我确实将测试目标 (LogicTests) 的 Base SDK 更改为 iOS4.1,并更新了可执行文件 (otest) 的 otest 脚本的路径。
然而,即使我的应用程序在 iPhone 模拟器中运行,执行单元测试总是会崩溃。这是当我尝试运行测试时控制台必须说的内容:
[Session started at 2010-09-15 23:28:37 +0200.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1472) (Wed Jul 21 10:53:12 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".tty /dev/ttys014
Loading program into debugger…
Program loaded.
run
[Switching to process 12125]
warning: The target crashed on startup, maybe the shell is crashing.
"Try set start-with-shell 0" to workaround.
The Debugger has exited due to signal 6 (SIGABRT).The Debugger has exited due to signal 6 (SIGABRT).
我非常感谢您能够提供的任何帮助!提前致谢。
干杯, 格奥尔格
I have just updated my XCode to 3.2.4 and it turns out my unit tests are no longer working. I have configured a target and executable following the instructions from Scott Densmore so that I'm able to debug my tests.
I did change the Base SDK to iOS4.1 for my test target (LogicTests) and updated the path to the otest script for my executable (otest).
However, even though my application runs in the iPhone simulator, executing the unit tests always crashes. Here's what the console has to say when I try to run the tests:
[Session started at 2010-09-15 23:28:37 +0200.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1472) (Wed Jul 21 10:53:12 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".tty /dev/ttys014
Loading program into debugger…
Program loaded.
run
[Switching to process 12125]
warning: The target crashed on startup, maybe the shell is crashing.
"Try set start-with-shell 0" to workaround.
The Debugger has exited due to signal 6 (SIGABRT).The Debugger has exited due to signal 6 (SIGABRT).
I'd appreciate any help you might be able to offer! Thanks in advance.
Cheers,
Georg
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也完全遇到了这个。发现我可以通过取消选中 DYLD_FORCE_FLAT_NAMESPACE 环境变量来运行测试。似乎会引起一些可怕的问题。如果我了解更多原因,我会发布相关内容。
Totally just ran into this, too. Found I could get my tests to run by unchecking the DYLD_FORCE_FLAT_NAMESPACE environment variable. Seems to cause some awful problems. If I learn more on why, I'll post about it.