Skip to content

Commit

Permalink
fixed ctest base name
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumevernieres committed Sep 18, 2024
1 parent cf7d590 commit a1c7ec6
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions test/gw-ci/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Function that generates the 1/2 cycle forecast and DA tasks
function(add_cycling_tests pslot YAML_PATH HOMEgfs RUNTESTS PROJECT_SOURCE_DIR TASK_LIST)
set(test_name test_gdasapp_${pslot})
# Prepare the COMROOT and EXPDIR for the cycling ctests
add_test(NAME test_gdasapp_${pslot}
add_test(NAME ${test_name}
COMMAND /bin/bash -c "${PROJECT_SOURCE_DIR}/test/gw-ci/create_exp.sh ${YAML_PATH} ${pslot} ${HOMEgfs} ${RUNTESTS}"
WORKING_DIRECTORY ${RUNTESTS})
set_tests_properties(${pslot} PROPERTIES LABELS "manual")
set_tests_properties(${test_name} PROPERTIES LABELS "manual")

# Get the 1/2 cycle and full cycle's dates
execute_process(
Expand All @@ -18,28 +19,28 @@ function(add_cycling_tests pslot YAML_PATH HOMEgfs RUNTESTS PROJECT_SOURCE_DIR T
list(GET DATES_LIST 1 FULL_CYCLE)

# stage IC's
message(STATUS "staging the 1/2 cycle IC's for ${pslot} ctest")
add_test(NAME test_gdasapp_${pslot}_gdasstage_ic_${HALF_CYCLE}
message(STATUS "staging the 1/2 cycle IC's for ${test_name} ctest")
add_test(NAME ${test_name}_gdasstage_ic_${HALF_CYCLE}
COMMAND /bin/bash -c "${PROJECT_SOURCE_DIR}/test/gw-ci/run_exp.sh ${pslot} gdasstage_ic ${HALF_CYCLE}"
WORKING_DIRECTORY ${RUNTESTS})
set_tests_properties(${pslot}_gdasstage_ic_${HALF_CYCLE} PROPERTIES LABELS "manual")
set_tests_properties(${test_name}_gdasstage_ic_${HALF_CYCLE} PROPERTIES LABELS "manual")

# 1/2 cycle gdasfcst
message(STATUS "preparing 1/2 cycle gdasfcst for ${pslot} ctest")
add_test(NAME test_gdasapp_${pslot}_gdasfcst_${HALF_CYCLE}
add_test(NAME ${test_name}_gdasfcst_${HALF_CYCLE}
COMMAND /bin/bash -c "${PROJECT_SOURCE_DIR}/test/gw-ci/run_exp.sh ${pslot} gdasfcst_seg0 ${HALF_CYCLE}"
WORKING_DIRECTORY ${RUNTESTS})
set_tests_properties(${pslot}_gdasfcst_${HALF_CYCLE} PROPERTIES LABELS "manual")
set_tests_properties(${test_name}_gdasfcst_${HALF_CYCLE} PROPERTIES LABELS "manual")

# Select the list of tasks to run for the full cycle
message(STATUS "Tasks ${TASK_LIST}")

foreach(task ${TASK_LIST})
message(STATUS "preparing the full cycle ${task} for ${pslot} ctest")
add_test(NAME test_gdasapp_${pslot}_${task}_${FULL_CYCLE}
add_test(NAME ${test_name}_${task}_${FULL_CYCLE}
COMMAND /bin/bash -c "${PROJECT_SOURCE_DIR}/test/gw-ci/run_exp.sh ${pslot} ${task} ${FULL_CYCLE}"
WORKING_DIRECTORY ${RUNTESTS})
set_tests_properties(${pslot}_${task}_${FULL_CYCLE} PROPERTIES LABELS "manual")
set_tests_properties(${test_name}_${task}_${FULL_CYCLE} PROPERTIES LABELS "manual")
endforeach()
endfunction()

Expand Down

0 comments on commit a1c7ec6

Please sign in to comment.