数十个“分析:无效的弧标记”在Xcode 5中运行代码覆盖时 [英] Dozens of "profiling:invalid arc tag" when running code coverage in Xcode 5

查看:139
本文介绍了数十个“分析:无效的弧标记”在Xcode 5中运行代码覆盖时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Xcode 5中启用代码覆盖率运行我的测试目标时,我在构建输出中收到以下几条消息:

When running my Test target with code coverage enabled in Xcode 5, I get dozens of the following message in the build output:

profiling:invalid arc tag (0x...)

它似乎不影响测试,因为它们成功完成,并且GCDA覆盖文件也按预期生成。

It doesn't seem to affect the tests, as they complete successfully, and also the GCDA coverage files are generated as expected.

知道消息的含义,或者如何抑制消息/解决问题,因为它们会使构建输出变得混乱,并且很难找到测试用例结果。

Any idea what the message means, or how to suppress the messages/fix the issue, because they clutter up the build output and make it hard to find the test case results.

推荐答案

这很可能是因为构建工具无法将当前结果合并到现有的.gcda coverage文件中。正如 Dave Meehan在这里指出,有一种通过清理产品构建文件夹来解决这个问题的蛮力方法,但是一种不那么难的核心方法是从生成它们的目标中删除.gcda文件(对我来说,只是测试目标)作为构建过程的一部分。 Dave包含一个示例脚本,作为构建阶段包含在内 - 或者,在项目根目录下手动执行:

Most likely this is a result of the build tools failing to merge current results into the existing .gcda coverage files. As Dave Meehan points out here, there is a brute force way of dealing with this by cleaning the product build folder, but a less hard core approach is to delete the .gcda files from targets generating them (for me, just the test target) as part of the build process. Dave includes a sample script to be included as a build phase -- or, at the project root by hand:

find . -name "*.gcda" -print0 | xargs -0 rm

这篇关于数十个“分析:无效的弧标记”在Xcode 5中运行代码覆盖时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆