summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt22
1 files changed, 18 insertions, 4 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 895579c..0af70f7 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -27,6 +27,16 @@ IF(BUILD_TESTING)
MARK_AS_ADVANCED(CTEST_TEST_CTEST)
ENDIF (CMAKE_RUN_LONG_TESTS)
+ # Use 1500 or CTEST_TEST_TIMEOUT for long test timeout value,
+ # whichever is greater.
+ SET(CMAKE_LONG_TEST_TIMEOUT 1500)
+ IF(CTEST_TEST_TIMEOUT)
+ SET(CMAKE_LONG_TEST_TIMEOUT ${CTEST_TEST_TIMEOUT})
+ ENDIF(CTEST_TEST_TIMEOUT)
+ IF(CMAKE_LONG_TEST_TIMEOUT LESS 1500)
+ SET(CMAKE_LONG_TEST_TIMEOUT 1500)
+ ENDIF(CMAKE_LONG_TEST_TIMEOUT LESS 1500)
+
# add a bunch of standard build-and-test style tests
ADD_TEST_MACRO(CommandLineTest CommandLineTest)
ADD_TEST_MACRO(FindPackageTest FindPackageTest)
@@ -655,17 +665,20 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
# if timeouts have not already been set
GET_TEST_PROPERTY(CTestTest TIMEOUT PREVIOUS_TIMEOUT)
IF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND)
- SET_TESTS_PROPERTIES ( CTestTest PROPERTIES TIMEOUT 1500)
+ SET_TESTS_PROPERTIES ( CTestTest
+ PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT})
ENDIF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND)
GET_TEST_PROPERTY(CTestTest2 TIMEOUT PREVIOUS_TIMEOUT)
IF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND)
- SET_TESTS_PROPERTIES ( CTestTest2 PROPERTIES TIMEOUT 1500)
+ SET_TESTS_PROPERTIES ( CTestTest2
+ PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT})
ENDIF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND)
GET_TEST_PROPERTY(CTestTest3 TIMEOUT PREVIOUS_TIMEOUT)
IF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND)
- SET_TESTS_PROPERTIES ( CTestTest3 PROPERTIES TIMEOUT 1500)
+ SET_TESTS_PROPERTIES ( CTestTest3
+ PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT})
ENDIF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND)
ENDIF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY)
ENDIF (CTEST_TEST_CTEST AND CMAKE_RUN_LONG_TESTS)
@@ -695,7 +708,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel
IF (COMMAND GET_TEST_PROPERTY)
GET_TEST_PROPERTY(BootstrapTest TIMEOUT PREVIOUS_TIMEOUT)
IF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND)
- SET_TESTS_PROPERTIES ( BootstrapTest PROPERTIES TIMEOUT 1500)
+ SET_TESTS_PROPERTIES ( BootstrapTest
+ PROPERTIES TIMEOUT ${CMAKE_LONG_TEST_TIMEOUT})
ENDIF ("${PREVIOUS_TIMEOUT}" MATCHES NOTFOUND)
ENDIF (COMMAND GET_TEST_PROPERTY)