Skip to content
Snippets Groups Projects
Unverified Commit 8fc807cd authored by Lars Bilke's avatar Lars Bilke
Browse files

[cmake,ci] Fix timeout setting in OgsTest().

parent 6e85babd
No related branches found
No related tags found
No related merge requests found
...@@ -26,11 +26,14 @@ function(OgsTest) ...@@ -26,11 +26,14 @@ function(OgsTest)
) )
endif() endif()
set(timeout ${ogs.ctest.large_runtime}) if(NOT DEFINED OgsTest_RUNTIME)
if(DEFINED OgsTest_RUNTIME)
math(EXPR timeout "${OgsTest_RUNTIME} * 3")
else()
set(OgsTest_RUNTIME 1) set(OgsTest_RUNTIME 1)
elseif(OgsTest_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 "${OgsTest_RUNTIME} * 2")
set(timeout TIMEOUT ${timeout})
endif() endif()
if(DEFINED OGS_CTEST_MAX_RUNTIME) if(DEFINED OGS_CTEST_MAX_RUNTIME)
...@@ -132,6 +135,7 @@ macro(_ogs_add_test TEST_NAME) ...@@ -132,6 +135,7 @@ macro(_ogs_add_test TEST_NAME)
${OgsTest_DISABLED} ${OgsTest_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