开发者

Is it possible to run only subsets of a Boost unit test module?

开发者 https://www.devze.com 2022-12-17 14:35 出处:网络
I am using the Boost 1.34.1 unit test framework. (I know the version is ancient, but right now updating or switching frameworks is not an option for technical reasons.)

I am using the Boost 1.34.1 unit test framework. (I know the version is ancient, but right now updating or switching frameworks is not an option for technical reasons.)

I have a single test module (#define BOOST_TEST_MODULE UnitTests) that consists of three test suites (BOOST_AUTO_TEST_SUITE( Suite1 );) which in turn consist of several BOOST_AUTO_TEST_CASE()s.

My question:

Is it possible to run only a subset of the test module, i.e. limit the test run to only one test suite, or even only one test case?

Reasoning:

I integrated the unit tests into our automake framework, so that the whole module is run on make check. I wouldn't want to split it up into multiple modules, because our application generates lots of output and it is nice to see the test summary at the bottom ("X of Y tests failed") instead of spread across several thousand lines of output.

But a full test run is also time consuming, and the output of the test you're looking fo开发者_如何学编程r is likewise drowned; thus, it would be nice if I could somehow limit the scope of the tests being run.

The Boost documentation left me pretty confused and none the wiser; anyone around who might have a suggestion? (Some trickery allowing to split up the test module while still receiving a usable test summary would also be welcome.)


Take a look at the --run_test parameter - it should provide what you're after.

0

精彩评论

暂无评论...
验证码 换一张
取 消