[CMake] Nightly only tests

Daniel Blezek Blezek.Daniel at mayo.edu
Fri Apr 17 15:35:12 EDT 2009


Alex,

  Sure, that will do the trick, but that requires developers to remember the
-E. ;->

I suppose an example would help...

add_test ( ForNightly BUILDTYPES "Nightly"
${CMAKE_BINARY_DIR}/bin/LongRunning --iterations 10000000 )

add_test ( ForExperimental BUILDTYPES "Experimental Continuous"
${CMAKE_BINARY_DIR}/bin/ShortRunning --iterations 10 )

add_test ( ForContinuous BUILDTYPES "Continuous"
${CMAKE_BINARY_DIR}/bin/MediumRunning --iterations 1000 )

A naked "ctest" would run only Experimental tests.  This could potentially
be made more flexible by adding "tags" to tests.

"ctest -tag Continuous" would run any tests with a "Continuous" tag.

Something like this would also be helpful for ITK, as it has 1200 tests and
takes several minutes to run.

Cheers,
-dan


On 4/17/09 2:03 PM, "Alexander Neundorf" <a.neundorf-work at gmx.net> wrote:

> On Friday 17 April 2009, Daniel Blezek wrote:
>> Hi all,
>> 
>>   Before I expend too many brain cells on a Friday, I thought I¹d ask the
>> list.
>> 
>>   We are approaching 100 test in our project.  I want our developers to run
>> tests before they check in, but some of the tests can take upwards of a
>> minute to run.  Is there some way to mark a test as part of the Nightly
>> tests only, and skip it for developer builds?
>> 
>>   I know I could do this through a CMake option, but perhaps there is a
>> cleaner solution.
> Does "ctest -E <exclude_regex>" help, i.e. can these tests easily be
> summarized by their name with a regexp ?
> 
> Alex

-- 
Daniel Blezek, PhD
Medical Imaging Informatics Innovation Center

P 127 or (77) 8 8886
T 507 538 8886
E blezek.daniel at mayo.edu

Mayo Clinic
200 First St. S.W.
Harwick SL-44
Rochester, MN 55905
mayoclinic.org




More information about the CMake mailing list