如何使用Eclipse处理Boost.Test输出 [英] How to process Boost.Test output with Eclipse
问题描述
我使用Eclipse CDT和Boost.Test(使用Boost.Build)。
我想让Eclipse解析在生成期间通过运行测试套件生成的Boost.Test的输出。
有人知道如何实现这一点吗?
提前感谢
I'm using Eclipse CDT and Boost.Test(with Boost.Build).
I would like Eclipse to parse output of Boost.Test generated during by run of test suites during build.
Does anybody know how to achieve this?
Thanks in advance
推荐答案
转到窗口>优先。在首选项对话框中,选择C / C ++>从选项树构建。在错误解析器下,单击添加...在新对话框中,将Regex错误解析器替换为类似Boost单元测试错误解析器。
Go to Window > Preferences. In the preferences dialog, choose C/C++ > Build from the options tree. Under error parsers, click "Add..." In the new dialog, replace "Regex Error Parser" with something like "Boost Unit Test Error Parser".
在错误解析器选项窗格中,添加以下行。我不能保证这些规则捕捉到所有可能的输出从boost单元测试,但到目前为止他们为我工作,我们可以总是添加更多:
In the Error Parser Options pane, add the following lines. I can't guarantee that these rules catch all possible output from boost unit tests, but so far they work for me, and we can always add more later:
Severity | Pattern | File | Line | Description
Error | (.*)\((\d*)\): ((fatal )?error in ".*":.*) | $1 | $2 | $3
Error | \*\*\* (\d* failures detected in test suite ".*")| | | $1
Info | (.*)\((\d*)\): (last checkpoint) | $1 | $2 | $3
请注意,新的解析器不会自动用于现有项目。要为现有项目启用解析器,请转到项目>属性,C / C ++ Make Project,错误解析器选项卡。如果新添加的解析器不在列表中,请单击恢复默认值,它现在应该可用。
Note that the new parser will not automatically be used in existing projects. To enable the parser for an existing project, go to Project > Properties, C/C++ Make Project, Error Parsers tab. If the newly added parser is not in the list, click "Restore Defaults", and it should now be available.
这篇关于如何使用Eclipse处理Boost.Test输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!