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

Xiaoxiao Liu xiaoxiao.liu at kitware.com
Fri Feb 25 15:56:40 EST 2011


Hi Michael,
Following bill's comments: in modular ITK, each module has one test driver
for all the tests in it (except ITK-Common right now, since it has bit of
customization with different test conditions).
Right, the Review right now is huge. As ITK grows, things will gradually
move out of the review directory and form  their own modules with reasonable
number of tests for each test driver.

-Xiaoxiao



On Fri, Feb 25, 2011 at 2:22 PM, M Stauffer (V) <mstauff at verizon.net> wrote:

> OK, great. Thanks Bill.
>
> >-----Original Message-----
> >From: Bill Lorensen [mailto:bill.lorensen at gmail.com]
> >Sent: Friday, February 25, 2011 2:12 PM
> >To: M Stauffer (V)
> >Cc: Insight Developers
> >Subject: Re: [Insight-developers] A patch to use the cmake test driver
> >
> >Michael,
> >
> >This will change in the couplke of week or so as we move to
> >ModularITK. The new directory structure has about 80 directories, each
> >one small.
> >
> >I'm not sure how the modularization s handling Review. If all of the
> >tests are in one directory, we can certainly generate multiple test
> >drivers.
> >
> >Let's wait and see,
> >
> >Bill
> >
> >
> >On Fri, Feb 25, 2011 at 1:35 PM, M Stauffer (V)
> ><mstauff at verizon.net> wrote:
> >> 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
> >>>>
> >>>>
> >>
> >>
>
> _______________________________________________
> 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
>



-- 
---------------------------------------------
*Xiaoxiao Liu*, Ph.D.
R & D Engineer
Kitware Inc <http://www.kitware.com/>.
Clifton Park, NY
Phone: (518) 881-4924  or  (518) 371-3971 x124
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110225/9d637be7/attachment.htm>


More information about the Insight-developers mailing list