iOS 4.1 SDK 中的单元测试被破坏了?

发布于 2024-09-18 15:01:01 字数 604 浏览 13 评论 0原文

升级到 4.1 iOS SDK 后,我的单元测试包总是返回以下两个错误和一个警告:

An internal error occurred when handling command output: -[XCBuildLogCommandInvocationSection setTestsPassedString:]: unrecognized selector sent to instance
An internal error occurred when handling command output: -[XCBuildLogCommandInvocationSectionRecorder endmarker:]: unrecognized selector sent to instance
Run unit tests for architecture 'i386' (GC OFF) did not finish

尽管报告 X 中的所有 X 测试都已通过,但我还是收到这些错误。我读到过有关旧版本 XCode 中的类似错误,该错误也在发布后立即发生(关于时间正则表达式中的错误),可以通过将时区设置为太平洋时间来缓解该错误,但我不能可以肯定地说,这是对那里的回归。

还有其他人遇到这个问题吗?

After upgrading to the 4.1 iOS SDK my unit test bundles always return with the following two errors and one warning:

An internal error occurred when handling command output: -[XCBuildLogCommandInvocationSection setTestsPassedString:]: unrecognized selector sent to instance
An internal error occurred when handling command output: -[XCBuildLogCommandInvocationSectionRecorder endmarker:]: unrecognized selector sent to instance
Run unit tests for architecture 'i386' (GC OFF) did not finish

I get these errors despite it reporting that all X out of X tests passed. I read about a similar bug in an older version of XCode that also occurred immediately after it was released (something about a bug in a regular expression for time) that could be mitigated by setting your time zone to Pacific Time, but I can't say for sure it's a regression to there specifically.

Is anyone else having this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

-柠檬树下少年和吉他 2024-09-25 15:01:01

苹果开发论坛上有一个修复程序,

https://devforums.apple.com/thread/68687< /a>

这是一个日期解析问题。修复速度很快,它需要将一个 .m 添加到您的测试包中。该修复可在上面或从以下位置获得:

http://gist.github.com/586296

There is a fix available on the apple dev forums,

https://devforums.apple.com/thread/68687

it's a date parsing problem. The fix is quick, it requires including one .m added to your test bundle. The fix is available above or from:

http://gist.github.com/586296

や莫失莫忘 2024-09-25 15:01:01

这似乎确实是一种回归,报告代码的某些部分不考虑时区问题。输出在开始之前就被标记为结束,因此会变得非常混乱和窒息。

我在 Google 上找到的一种解决方法是更改​​目标的运行脚本阶段。

改为

"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" 

"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" 1> /tmp/RunUnitTests.out 

是在解决问题,而不是解决问题,但确实有效。

It does seem to be a regression with some part of the reporting code not respecting timezone issues. The output is tagged as ending before it began, so gets very confused and chokes.

One work-around, that I found somewhere on Google, is to change the Run Script stage of the target.

Change

"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" 

to

"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests" 1> /tmp/RunUnitTests.out 

It’s working round the issue, rather than solving it, but does work.

回眸一遍 2024-09-25 15:01:01

这是 Xcode 3.2.4/4.1 SDK 中已确认的错误。已向苹果公司报告。

升级到 Xcode 3.2.5/4.2 beta SDK 可以解决该问题。我不知道 beta SDK:s 的访问权限是否开放,或者您是否需要成为注册开发人员。

This is a confirmed bug in Xcode 3.2.4/4.1 SDK. It has been reported to Apple.

Upgrading to Xcode 3.2.5/4.2 beta SDK solves the problem. I don't know if access to beta SDK:s is open, or if you need to be a registered developer, though.

梦屿孤独相伴 2024-09-25 15:01:01

我也遇到同样的问题。

奇怪的是,我可以按照 http:// 通过调试器运行单元测试来正确完成单元测试。 www.grokkingcocoa.com/how_to_debug_iphone_unit_te.html

所以看起来 XCode 的 otest 接口有问题...

我真的不想将我的时区设置为 PST 这篇文章似乎表明我在英国......

I'm getting the same issue too.

Oddly enough, I can get the unit tests to complete properly by running them through the debugger as per http://www.grokkingcocoa.com/how_to_debug_iphone_unit_te.html

So it looks like something wrong with the XCode interface to otest...

I really don't want to set my timezone to PST which this post seems to be indicating as I'm in the UK...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文