Skip to content

Commit

Permalink
Build GDASApp outside of global-workflow (#1306)
Browse files Browse the repository at this point in the history
Tests in `tests/gw-ci` require global-workflow. As such, GDASApp can not
build outside of g-w. This PR places gw-ci tests under the flag
`RUN_GW_CI`. gw-ci tests are built when `RUN_GI_CW` is set to `ON`. The
default is `OFF`. With this change GDASApp can be built without g-w.

Resolves #1305
  • Loading branch information
RussTreadon-NOAA committed Sep 30, 2024
1 parent 2be1fcd commit 3a34812
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
12 changes: 7 additions & 5 deletions test/aero/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# tests that can run without needing all JEDI components

# test to generate YAML for aerosol 3DVar
add_test(NAME test_gdasapp_aero_gen_3dvar_yaml
COMMAND ${PROJECT_SOURCE_DIR}/test/aero/genyaml_3dvar.sh ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}
WORKING DIRECTORY ${PROJECT_BINARY_DIR}/test/testrun/)

# test to generate YAML for aerosol 3DVar.
if (WORKFLOW_TESTS)
add_test(NAME test_gdasapp_aero_gen_3dvar_yaml
COMMAND ${PROJECT_SOURCE_DIR}/test/aero/genyaml_3dvar.sh ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}
WORKING DIRECTORY ${PROJECT_BINARY_DIR}/test/testrun/)
endif()

# tests that require the full build
if(BUILD_GDASBUNDLE)
# Test exgdas scripts from the global-worflow
Expand Down
34 changes: 18 additions & 16 deletions test/gw-ci/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,25 @@ function(add_cycling_tests pslot YAML_PATH HOMEgfs RUNTESTS PROJECT_SOURCE_DIR T
endforeach()
endfunction()

# Setup the environement
set(HOMEgfs ${CMAKE_SOURCE_DIR}/../../..)
set(RUNTESTS ${CMAKE_CURRENT_BINARY_DIR}/../../test/gw-ci)
if (WORKFLOW_TESTS)
# Setup the environement
set(HOMEgfs ${CMAKE_SOURCE_DIR}/../../..)
set(RUNTESTS ${CMAKE_CURRENT_BINARY_DIR}/../../test/gw-ci)

# 3DVAR WCDA, low-res
# -------------------
set(pslot "WCDA-3DVAR-C48mx500")
set(YAML_PATH ${HOMEgfs}/ci/cases/pr/C48mx500_3DVarAOWCDA.yaml)
set(TASK_LIST
"gdasprepoceanobs"
"gdasmarinebmat"
"gdasmarineanlinit"
"gdasmarineanlvar"
"gdasmarineanlchkpt"
"gdasmarineanlfinal"
)
add_cycling_tests(${pslot} ${YAML_PATH} ${HOMEgfs} ${RUNTESTS} ${PROJECT_SOURCE_DIR} "${TASK_LIST}")
# 3DVAR WCDA, low-res
# -------------------
set(pslot "WCDA-3DVAR-C48mx500")
set(YAML_PATH ${HOMEgfs}/ci/cases/pr/C48mx500_3DVarAOWCDA.yaml)
set(TASK_LIST
"gdasprepoceanobs"
"gdasmarinebmat"
"gdasmarineanlinit"
"gdasmarineanlvar"
"gdasmarineanlchkpt"
"gdasmarineanlfinal"
)
add_cycling_tests(${pslot} ${YAML_PATH} ${HOMEgfs} ${RUNTESTS} ${PROJECT_SOURCE_DIR} "${TASK_LIST}")
endif()

option(RUN_GW_CI "Enable the global-workflow CI tests" OFF)
if (RUN_GW_CI)
Expand Down

0 comments on commit 3a34812

Please sign in to comment.