From 27e668a3cbbb7bfbef3b8eb45c6b1d2e335826d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 26 Jul 2018 13:52:24 +0300 Subject: [PATCH] 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. --- maxscale-system-test/utilities.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maxscale-system-test/utilities.cmake b/maxscale-system-test/utilities.cmake index 5bd8d6444..bc885aeea 100644 --- a/maxscale-system-test/utilities.cmake +++ b/maxscale-system-test/utilities.cmake @@ -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