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

Bill Lorensen bill.lorensen at gmail.com
Mon Feb 7 15:06:18 EST 2011


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