views:

206

answers:

1

Hi all, 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

+1  A: 

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".

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

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.

Mark Stijnman