[CMake] How to set _default_ timeout for the ctest command?
Brad King
brad.king at kitware.com
Mon Dec 14 15:52:26 EST 2015
On 12/09/2015 10:06 PM, Alan W. Irwin wrote:
> Also, the documentation of the ctest --timeout option says:
>
> `--timeout <seconds>`
> Set a global timeout on all tests.
>
> This option will set a global timeout on all tests that do not
> already have a timeout set on them.
Yes, one can see that implemented here:
https://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/CTest/cmCTestTestHandler.cxx;hb=v3.4.1#l1112
https://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmCTest.cxx#l2108
Here is a commit that set the order of precedence:
Local test timeouts will now always take precedence over the global --timeout option.
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c32088cf
>From the history of that code it looks like --timeout was added with
no consideration of its relationship to CTEST_TEST_TIMEOUT. Some
other CTest options in the same scope as CTEST_TEST_TIMEOUT can be
overridden by the command line, so I agree that --timeout should
override it too.
-Brad
More information about the CMake
mailing list