Skip to content
Snippets Groups Projects
Verified Commit 86f23e2a authored by Lars Bilke's avatar Lars Bilke
Browse files

[cmake] Set runtime parameter on larger benchmarks.

Wwhich exceed the ctest default of 1500 s.
parent f0d59f6f
No related branches found
No related tags found
No related merge requests found
...@@ -96,11 +96,13 @@ function(AddTest) ...@@ -96,11 +96,13 @@ function(AddTest)
if(NOT DEFINED AddTest_REQUIREMENTS) if(NOT DEFINED AddTest_REQUIREMENTS)
set(AddTest_REQUIREMENTS TRUE) set(AddTest_REQUIREMENTS TRUE)
endif() endif()
set(timeout ${ogs.ctest.large_runtime}) if(NOT DEFINED AddTest_RUNTIME)
if(DEFINED AddTest_RUNTIME)
math(EXPR timeout "${AddTest_RUNTIME} * 3")
else()
set(AddTest_RUNTIME 1) set(AddTest_RUNTIME 1)
elseif(AddTest_RUNTIME GREATER 750)
# Set a timeout on jobs larger than the default ctest timeout of 1500 (s).
# The allowed runtime is twice as long as the given RUNTIME parameter.
math(EXPR timeout "${AddTest_RUNTIME} * 2")
set(timeout TIMEOUT ${timeout})
endif() endif()
if(NOT DEFINED AddTest_WORKING_DIRECTORY) if(NOT DEFINED AddTest_WORKING_DIRECTORY)
set(AddTest_WORKING_DIRECTORY ${AddTest_BINARY_PATH}) set(AddTest_WORKING_DIRECTORY ${AddTest_BINARY_PATH})
...@@ -381,6 +383,7 @@ macro(_add_test TEST_NAME) ...@@ -381,6 +383,7 @@ macro(_add_test TEST_NAME)
${AddTest_DISABLED} ${AddTest_DISABLED}
LABELS LABELS
"${labels}" "${labels}"
${timeout}
) )
endmacro() endmacro()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment