Skip to content

Commit

Permalink
Merge branch 'notebook-large-label' into 'master'
Browse files Browse the repository at this point in the history
[cmake] Add missing ctest labels to notebooks.

See merge request ogs/ogs!4774
  • Loading branch information
bilke committed Oct 24, 2023
2 parents bb7f2ab + a07d9db commit 4b960bc
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions scripts/cmake/test/NotebookTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,22 @@ function(NotebookTest)
return()
endif()
endif()

if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/ProcessLib)
current_dir_as_list(ProcessLib labels)
endif()
list(APPEND labels Notebook)
if(DEFINED NotebookTest_LABELS)
list(APPEND labels ${NotebookTest_LABELS})
else()
list(APPEND labels default)
endif()
# Notebooks are allowed to run longer than usual benchmarks
math(EXPR _notebook_large_runtime "10 * ${ogs.ctest.large_runtime}")
if(${NotebookTest_RUNTIME} GREATER ${_notebook_large_runtime})
if(${NotebookTest_RUNTIME} LESS_EQUAL ${_notebook_large_runtime})
list(APPEND labels small)
else()
list(APPEND labels large)
string(APPEND NotebookTest_NAME_WE "-LARGE")
endif()

Expand Down Expand Up @@ -96,16 +109,6 @@ function(NotebookTest)
${PROJECT_SOURCE_DIR}/scripts/cmake/test/OgsTestWrapper.cmake
)

if(EXISTS ${CMAKE_CURRENT_LIST_DIR}/ProcessLib)
current_dir_as_list(ProcessLib labels)
endif()
list(APPEND labels Notebook)
if(DEFINED NotebookTest_LABELS)
list(APPEND labels ${NotebookTest_LABELS})
else()
list(APPEND labels default)
endif()

list(
APPEND
_props
Expand Down

0 comments on commit 4b960bc

Please sign in to comment.