[Insight-developers] A patch to use the cmake test driver

M Stauffer (V) mstauff at verizon.net
Fri Feb 25 13:35:13 EST 2011


Hi Bill,

I think it would be very helpful to generate multiple, smaller drivers
using the new method - for me at least. Anyone else? The goal is to
avoid having to build all the tests in a given group when it's
unnecessary.

Yesterday I made a small change to a class in Review, and to build its
test, all other tests in the Review group have to be built, which takes
about half an hour here. When I'm working on a new class, I create a
small 2nd driver just for the class like you suggested, so I can build
it quickly, but I still have to move the test back into the main driver
before submitting, and check that it builds. 

Maybe there could be 10 tests per driver? It seems you can find what
driver your test is in by grep'ing for its name in the
Testing/Code/<your_group>/CMakeFiles.

Cheers,
Michael 

>-----Original Message-----
>From: Bill Lorensen [mailto:bill.lorensen at gmail.com] 
>Sent: Monday, February 07, 2011 3:06 PM
>To: M Stauffer (V)
>Cc: Luis Ibanez; Insight Developers
>Subject: Re: [Insight-developers] A patch to use the cmake test driver
>
>You don't. Now there is only one test driver per kit. in a kit (e.g.
>Review) all examples use the same test driver. As a developer, you
>could create another driver until your happy with your code, them
>include it in the big driver.
>For example:
>set(KIT2 MyTest)
>CreateTestDriver(${KIT2} "${KIT_LIBS}" "${KitTests}" TestDriver2)
>Then
>add_test(MyTest ${TestDriver2} myTest)
>
>I understand your concern that you may have to compile all of the
>tests in a given kit.
>
>If this becomes an issue, we can generate multiple drivers, still
>using the new methodology.
>
>Bill
>
>
>On Mon, Feb 7, 2011 at 2:49 PM, M Stauffer (V) 
><mstauff at verizon.net> wrote:
>> Bill,
>>
>> How do I determine what test driver is used for a particular test?
>> Previously I avoided building all tests, which saves a good amount of
>> build time, by calling, e.g. make itkReviewTests6 to build only the
>> driver that contained my new code. I now see
>> ./Code/IO/itkTestDriver.cxx, but that's it for obvious test driver
>> source files.
>>
>> Cheers,
>> Michael
>>
>>>-----Original Message-----
>>>From: insight-developers-bounces at itk.org
>>>[mailto:insight-developers-bounces at itk.org] On Behalf Of 
>Bill Lorensen
>>>Sent: Thursday, January 27, 2011 6:40 AM
>>>To: Luis Ibanez
>>>Cc: Insight Developers
>>>Subject: [Insight-developers] A patch to use the cmake test driver
>>>
>>>Luis,
>>>
>>>A heads up on this patch: 
>http://review.source.kitware.com/#change,779
>>>
>>>It uses cmake to generate test drivers. I'm trying it out on
>>>Testing/Code/Numerics/NeuralNetworks.
>>>
>>>I based the include file on the one you posted in one of the modular
>>>topics. That code did not compile. You can look at 
>itkv4TestMain.h for
>>>corrections.
>>>
>>>Once propagated to the rest of ITK it should reduce the 
>number of test
>>>executables from 36 to 11. Also, it is the standard way to generate
>>>tests and will simplify the CMakeLists.txt files.
>>>
>>>Looking forward to your comments on gerrit.
>>>
>>>Bill
>>>_______________________________________________
>>>Powered by www.kitware.com
>>>
>>>Visit other Kitware open-source projects at
>>>http://www.kitware.com/opensource/opensource.html
>>>
>>>Kitware offers ITK Training Courses, for more information visit:
>>>http://kitware.com/products/protraining.html
>>>
>>>Please keep messages on-topic and check the ITK FAQ at:
>>>http://www.itk.org/Wiki/ITK_FAQ
>>>
>>>Follow this link to subscribe/unsubscribe:
>>>http://www.itk.org/mailman/listinfo/insight-developers
>>
>>



More information about the Insight-developers mailing list