Set test timeout to 900 seconds

Any test that takes longer than 15 minutes to run is too long and should
explicitly set a longer timeout.
This commit is contained in:
Markus Mäkelä 2018-07-26 13:52:24 +03:00
parent 571d52f557
commit 27e668a3cb
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -4,6 +4,9 @@ function(add_template name template)
set(CNF_TEMPLATES "${CNF_TEMPLATES}{\"${name}\",\"${template}\"}," CACHE INTERNAL "")
endfunction()
# Default test timeout
set(TIMEOUT 900)
# This functions adds a source file as an executable, links that file against
# the common test core and creates a test from it. The first parameter is the
# source file, the second is the name of the executable and the test and the
@ -26,6 +29,7 @@ function(add_test_executable source name template)
get_property(prev_labels TEST ${name} PROPERTY LABELS)
set_property(TEST ${name} PROPERTY LABELS ${label} ${prev_labels})
endforeach()
set_property(TEST ${name} PROPERTY TIMEOUT ${TIMEOUT})
endfunction()
# Same as add_test_executable, but do not add executable into tests list
@ -39,6 +43,7 @@ endfunction()
function(add_test_derived name executable template)
add_template(${name} ${template})
add_test(NAME ${name} COMMAND ${CMAKE_BINARY_DIR}/${executable} ${name} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TEST ${name} PROPERTY TIMEOUT ${TIMEOUT})
list(REMOVE_AT ARGV 0 1 2)
@ -61,6 +66,7 @@ function(add_test_script name script template labels)
get_property(prev_labels TEST ${name} PROPERTY LABELS)
set_property(TEST ${name} PROPERTY LABELS ${label} ${prev_labels})
endforeach()
set_property(TEST ${name} PROPERTY TIMEOUT ${TIMEOUT})
endfunction()
# Label a list of tests as heavy, long running tests