[cmake-developers] [CMake] How to set _default_ timeout for the ctest command? (fwd)

David Cole DLRdave at aol.com
Thu Dec 17 21:39:55 EST 2015


The principle "most local setting wins" should be followed.

If a script is called without --timeout cmd line param, CTEST_TEST_TIMEOUT applies, if set. Otherwise default timeout value.

If a script is called with --timeout cmd line param, then that **is** the timeout value, and CTEST_TEST_TIMEOUT should be ignored.

In either case, test property TIMEOUT should win/override to preserve the backwards compatibility for the use cases which currently depend on that.
 
Good scripts will wrap their setting of CTEST_TEST_TIMEOUT with an "if(NOT DEFINED" anyhow... Same with good projects.


David

> On Dec 17, 2015, at 2:42 PM, Ben Boeckel <ben.boeckel at kitware.com> wrote:
> 
>> On Thu, Dec 17, 2015 at 13:54:08 -0500, David Cole wrote:
>> I agree with Brad, the --timeout command line parameter should only
>> set/override the variable CTEST_TEST_TIMEOUT. The behavior w.r.t. test
>> TIMEOUT properties should be left as is for this change.
> 
> This behavior also makes sense to me. However, what about script mode
> which sets CTEST_TEST_TIMEOUT itself? Is CTEST_TEST_TIMEOUT readonly if
> --timeout is given?
> 
> --Ben


More information about the cmake-developers mailing list