[CMake] Re: [Insight-users] Timeout message during tests

Karthik Krishnan Karthik.Krishnan at kitware.com
Thu Jul 20 09:09:19 EDT 2006


Dan Mueller wrote:

> Hi,
>
> I am trying to compare the computation times of two different 
> approaches within ITK, using CMake to script the tests. The starting 
> and ending times are listed in the LastTest.log, so I was planning to 
> use these to record how long each test takes. Each test could take a 
> long time (~250minutes).


That's awfully long for  a test, don't you think ? But you can increase 
the dart testing time out using the variable. The default is 1500 s.
See    DART_TESTING_TIMEOUT in your CMakeCache.txt variable.

> When running these tests I am receiving "Timeout" messages for tests 
> that take longer than 25 minutes. *
>
> Is there a way to increase the timeout limit? If not, is there another 
> way to record how long a test takes?*

On Linux (probably cygwin too),
  'time foo'
will summarize the time the foo took to run

Or you could use the itk::TimeProbe to print the time yourself. See 
http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/Numerics/Statistics/itkMersenneTwisterRandomVariateGeneratorTest.cxx?annotate=1.9&root=Insight
for an example.

>
> My computer details are below:
>
>     * Operating System=Windows XP SP2
>     * CMake=CMake 2.4.2
>     * Compiler=Microsoft.NET 2003 (7.1.3088)
>     * ITK=InsightToolkit-2.8.1
>
>
> My CMake script is below:
>
> #Set the test drivers
> SET(SOURCE_TEST_DRIVER 
> ${EXECUTABLE_OUTPUT_PATH}/MaskedSpatialObjectToImageTestDriver)
>
> #Add includes
> INCLUDE_DIRECTORIES (
>   ${SOURCE_PATH}
>   ${EXAMPLES_PATH}
>   ${TESTING_PATH}
> )
>
> #Set source test files
> SET(TEST_FILE_SOURCES
>     itkMaskedSpatialObjectToImageFilterTests.cxx
> )
>
> #Add source test driver exe
> ADD_EXECUTABLE(MaskedSpatialObjectToImageTestDriver
>                MaskedSpatialObjectToImageTestDriver.cxx 
> ${TEST_FILE_SOURCES})
> TARGET_LINK_LIBRARIES(MaskedSpatialObjectToImageTestDriver 
> ${ITK_LIBRARIES})
>
> #Add some tests
> SET(NUMBER_OF_RUNS 5)
>
> FOREACH(RUN_COUNT RANGE 1 ${NUMBER_OF_RUNS})
>
> ADD_TEST(MaskedSpatialObject_Real1_${RUN_COUNT}
>          ${SOURCE_TEST_DRIVER}
>          itkMaskedSpatialObjectToImageFilterTest
>          ${IMAGES_PATH}/Real1.mhd
>          ${TESTING_OUTPUT_PATH}/Real1_IMAGE_MASKED.mhd
>          512 512 404                 #Size
>          0.414063 0.414063 0.400024  #Spacing
>          8.0                         #MaskResampleFactor
>          2                           #MaskDilateSize
> )
>
> ADD_TEST(SpatialObject_Real1_${RUN_COUNT}
>          ${SOURCE_TEST_DRIVER}
>          itkSpatialObjectToImageFilterTest
>          ${IMAGES_PATH}/Real1.mhd
>          ${TESTING_OUTPUT_PATH}/Real1_IMAGE_NORM.mhd
>          512 512 404                 #Size
>          0.414063 0.414063 0.400024  #Spacing
>          8.0                         #MaskResampleFactor
>          2                           #MaskDilateSize
> )
>
> ENDFOREACH(RUN_COUNT)
>
> I can only find the DART_TESTING_TIMEOUT:STRING=1500 variable in my 
> CMakeCache.txt.
>
> Any help would be appreciated!
>
> Cheers
>
> Dan Mueller
> d.mueller at qut.edu.au
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>  
>


More information about the CMake mailing list