Default timeout for tests (CTEST_TEST_TIMEOUT vs DART_TESTING_TIMEOUT vs ???)
Unless I missed it there does not seem to be a documented way to specify a default timeout for tests (i.e. without setting the TIMEOUT
property on each individual test) while configuring a project. I'm not even sure anymore if there even is an official way to do this.
There are two relevant variables I found:
-
CTEST_TEST_TIMEOUT
which is also - apparently misleadingly - mentioned in the documentation for theTIMEOUT
test property. Misleadingly, because this variable does not seem to have any effect whatsoever when it occurs in a CMakeLists.txt, no matter whether set before or after usinginclude(CTest)
. While this is the variable one finds mentioned sporadically, it seems unsuitable for usage outside of a ctest dashboard client script. -
DART_TESTING_TIMEOUT
(apparently only mentioned a single time in all documentation). Almost nowhere mentioned and seemingly irrelevant while simply running tests usingctest
from the build directory.
Now, while the second command is mostly undocumented and seemingly irrelevant, it actually does set the default test timeout when set before using include(CTest)
. The value ends up in the file "DartConfiguration.tcl" in the build directory and apparently ctest parses that file when run subsequently.
Now AFAIU "Dart" is mostly outdated, so I have doubts usage of DART_TESTING_TIMEOUT
is the best way to do this, but unless it's missing from documentation I'm not sure there even is an intended way to set default test timeout!