iOS 4.1 SDK 中的单元测试被破坏了?
升级到 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
苹果开发论坛上有一个修复程序,
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
这似乎确实是一种回归,报告代码的某些部分不考虑时区问题。输出在开始之前就被标记为结束,因此会变得非常混乱和窒息。
我在 Google 上找到的一种解决方法是更改目标的运行脚本阶段。
改为
它
是在解决问题,而不是解决问题,但确实有效。
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
to
It’s working round the issue, rather than solving it, but does work.
这是 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.
我也遇到同样的问题。
奇怪的是,我可以按照 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...