summaryrefslogtreecommitdiff
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-31 13:56:49 -0400
committerBrad King <brad.king@kitware.com>2017-03-31 13:56:49 -0400
commit716f8c88c9c94dc58f22ae770d613a4fec51c276 (patch)
tree3df5656a26486b9c6510d4faa4c5a2894b9665a5 /Tests
parentc791fb12544926bc5870a61735dc2ec62940a6f6 (diff)
downloadcmake-716f8c88c9c94dc58f22ae770d613a4fec51c276.tar.gz
Tests: Add option to customize LinkInterfaceLoop timeout
This test has a timeout in case CMake gets into an infinite loop. The default of 90 seconds should be plenty of time for the test to run correctly since it does not actually do a build. However, busy machines that run lots of tests in parallel may need a longer timeout. Give them an option to extend it.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeOnly/CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/Tests/CMakeOnly/CMakeLists.txt b/Tests/CMakeOnly/CMakeLists.txt
index c692cbd581..d44c83667f 100644
--- a/Tests/CMakeOnly/CMakeLists.txt
+++ b/Tests/CMakeOnly/CMakeLists.txt
@@ -9,7 +9,14 @@ macro(add_CMakeOnly_test test)
endmacro()
add_CMakeOnly_test(LinkInterfaceLoop)
-set_property(TEST CMakeOnly.LinkInterfaceLoop PROPERTY TIMEOUT 90)
+# If a bug is introduced in CMake that causes an infinite loop while
+# analyzing LinkInterfaceLoop then don't let the test run too long.
+# Use an option to customize it so that the timeout can be extended
+# on busy machines.
+if(NOT DEFINED CMake_TEST_CMakeOnly.LinkInterfaceLoop_TIMEOUT)
+ set(CMake_TEST_CMakeOnly.LinkInterfaceLoop_TIMEOUT 90)
+endif()
+set_property(TEST CMakeOnly.LinkInterfaceLoop PROPERTY TIMEOUT ${CMake_TEST_CMakeOnly.LinkInterfaceLoop_TIMEOUT})
add_CMakeOnly_test(CheckSymbolExists)