MantisBT - CMake
View Issue Details
0011383CMakeCTestpublic2010-10-29 17:442011-05-02 14:45
Clinton Stimpson 
Zach Mullen 
normalminoralways
closedfixed 
 
CMake 2.8.4 
0011383: timeout test property not respected if zero

If I put this in my .ctest script
set(CTEST_TEST_TIMEOUT 2)
then in a CMakeLists.txt
set_tests_properties(mytest PROPERTIES TIMEOUT 4)
I get a 4 second timeout as expected.
But if I change that to
set_tests_properties(mytest PROPERTIES TIMEOUT 0)
to remove the timeout, I get a 2 second timeout instead.
No tags attached.
Issue History
2010-10-29 17:44Clinton StimpsonNew Issue
2010-10-29 17:52David ColeNote Added: 0022756
2010-12-15 12:11David ColeNote Added: 0024172
2010-12-15 12:11David ColeAssigned To => Zach Mullen
2010-12-15 12:11David ColeStatusnew => assigned
2011-01-03 10:32Zach MullenNote Added: 0024358
2011-01-03 10:52Clinton StimpsonNote Added: 0024359
2011-01-03 11:05David ColeNote Added: 0024360
2011-01-03 14:53Zach MullenNote Added: 0024365
2011-01-03 14:53Zach MullenStatusassigned => resolved
2011-01-03 14:53Zach MullenFixed in Version => CMake 2.8.4
2011-01-03 14:53Zach MullenResolutionopen => fixed
2011-05-02 14:45David ColeNote Added: 0026303
2011-05-02 14:45David ColeStatusresolved => closed

Notes
(0022756)
David Cole   
2010-10-29 17:52   
Looks like this property is not well documented...

As a workaround, if your intent is to give it an infinite timeout, just use a very large number for now. For example, 86400 should give it a full day to run. If you need longer than that, ... well, let's just say this issue probably isn't your biggest problem.

:-)
(0024172)
David Cole   
2010-12-15 12:11   
Zach, Bill: not sure what our intent is for a test with an explicit "0" TIMEOUT property value... Should that mean an infinite timeout, or should it mean: use the CTEST_TEST_TIMEOUT value instead...?

Either way, it should be documented, so I'm leaving this open for now, and assigning to Zach.
(0024358)
Zach Mullen   
2011-01-03 10:32   
Good question... Right now 0 is equivalent to "not set". My opinion would be to change the behavior so that an explicit 0 results in an infinite timeout, which seems more consistent with the underlying api to instantiate the process.

Will wait for consenting opinion(s) before making the change...
(0024359)
Clinton Stimpson   
2011-01-03 10:52   
Sounds fine with me.
(0024360)
David Cole   
2011-01-03 11:05   
Sounds good to me, too.

So:
property missing == use CTEST_TEST_TIMEOUT
property 0 == infinite timeout
property positive integer == test specific timeout in seconds
(0024365)
Zach Mullen   
2011-01-03 14:53   
Fix committed:

http://cmake.org/gitweb?p=cmake.git;a=commit;h=51bb49357495ea2742858ffe9d76ab3f44efc06e [^]

Test for this behavior:

http://www.cdash.org/CDash/viewTest.php?onlydelta&buildid=816377 [^]
http://www.cdash.org/CDash/viewTest.php?onlydelta&buildid=816381 [^]
(0026303)
David Cole   
2011-05-02 14:45   
Closing resolved issues that have not been updated in more than 3 months.