|
Boost : |
Subject: [boost] [test] Patches to improve test log detail for better thirdparty integration
From: Jamie Allsop (ja11sop_at_[hidden])
Date: 2012-09-25 10:00:28
In light of recent discussions regarding Boost.Test I've created 3
tickets in trac with patches against trunk that incrementally improve
the ease with which Boost.Test can be integrated with thirdparty
continuous integration tools, while at the same time improving the
output offered.
These are patches we've been using for some time locally, the recent
discussions highlighted the importance of pushing patches like these to
a wider audience.
In summary the key changes are:
* https://svn.boost.org/trac/boost/ticket/7410
* all test cases/suites have file and line information captured so
that external tools can use the Boost.Log output to create links into
the source tree, answering questions like, "What is this test case?". It
is possible to simply follow the link and see.
* https://svn.boost.org/trac/boost/ticket/7417
* update the Boost.Test log output to include summary status
information when a test case or suite is completed. This includes the
test status, assertions passed and total assertions. This allows live
test status to be viewed and nicer tools to be built around this. For
example each test can be shown starting, in progress and then complete
with the resulting status in detail. I should note that Boost.Test
reports currently output this additional test status but this is done
only on completion of all tests and so cannot be used to show live progress.
* this additional test status as part of the log can be easily
captured using regular expressions if HRF is used and many IDEs will
allow colourisation, autolinking and so on using similar approaches.
* https://svn.boost.org/trac/boost/ticket/7397
* update Boost.Test to use the new Boost.Timer classes introduced in
Boost 1.48. This can be suppressed through the use of a macro should the
old timers be preferred. The new Boost.Timer provides much better timing
information than the old Boost.Timer library. You should refer to the
library itself for an explanation of why the previous timer library was
deprecated:
http://www.boost.org/doc/libs/1_51_0/libs/timer/doc/index.html
These patches address what I believe to be important missing features of
Boost.Test. We have been using these patches in our systems with Boost
1.49 and enjoy very nice CI integration with Trac Bitten and our Scons
build tools. I would therefore encourage those that use Boost.Test and
who are interested in these patches in general to take a look. The
Boot.Timer patch is important as it also addresses compile issues. See
the recent thread here:
http://thread.gmane.org/gmane.comp.lib.boost.devel/234411
Gennadiy - assuming you find these acceptable they could be committed to
trunk. I don't have commit privileges to do it myself and besides they
need reviewed first. Also I would prefer a closer look was taken at the
impact they might have on Boost.Test's tests.
Finally I should also note that one reason for providing the
BOOST_TEST_USE_DEPRECATED_TIMER macro was to circumvent the issue of the
new Boost.Timer depending on Boost.System. I don't recall if
Boost.System can used header-only? I certainly remember a lot of
discussion about it.
Jamie
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk