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.
This commit is contained in:
Brad King
2017-03-31 13:56:49 -04:00
parent c791fb1254
commit 716f8c88c9
+8 -1
View File
@@ -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)