[CMake] CTest + unit test frameworks integration
Bill Hoffman
bill.hoffman at kitware.com
Mon Jul 21 09:13:50 EDT 2008
Yuri Timenkov wrote:
> On Friday 18 July 2008 22:38:26 Alexander Neundorf wrote:
>> On Friday 18 July 2008, Yuri Timenkov wrote:
>>> Does anyone have an experience in integrating Unit test frameworks with
>>> CTest? AFAIK many of such frameworks provide means to register tests and
>>> test cases, and it would be nice to make ctest aware of such things,
>>> because it's not good to make changes in multiple places when I add new
>>> test.
>>>
>>> I know, KDE has some things, but their approach doesn't allow to run
>>> single test.
>> Do you mean with a "single" test a single test executable with all tests or
>> a single test within a single test executable ?
>> If there is something bad, of course we'll try to fix it.
> I mean QTest allows to have multiple tests in single executable. So with CTest
> you have 2 options:
> 1) run all QTest tests as single CTest test (as it is works now).
> 2) Add custom CTest target which runs only selected tests.
>
> This is just an idea how to have multiple tests in single executable and
> ability to invoke each of them from CTest.
>
This looks like a good idea. I would say each QTest should be a test in
CTest. Creating a module with some functions/macros to make this happen
sounds like a good idea to me.
-Bill
--
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518-371-3971 (phone and fax)
More information about the CMake
mailing list