Skip to content

Commit

Permalink
added CMakeLists for creating initial case EXPDIR usint ctest
Browse files Browse the repository at this point in the history
  • Loading branch information
Terry McGuinness committed Dec 6, 2024
1 parent 987ae5b commit 61fcf83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions ci/scripts/ctests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,10 @@ project(FunctionalTests)

enable_testing()

# Add a custom build step to run a script
add_custom_target(BuildScript
COMMAND bash ${CMAKE_SOURCE_DIR}/sorc/build_all.sh
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Running custom build script"
)

# Add a CTest to run the generate_workflows.sh script with additional arguments
set(YAMLS "C48_ATM.yaml" CACHE STRING "YAML files separated by spaces")
set(RUNTESTS "${CMAKE_BINARY_DIR}/RUNTESTS" )
set(HOMEgfs ${CMAKE_CURRENT_SOURCE_DIR}/../../..)

# Get the Git hash
execute_process(
Expand All @@ -24,4 +18,4 @@ execute_process(
)

add_test(NAME CreateExperiment
COMMAND bash ${CMAKE_SOURCE_DIR}/workflow/generate_workflows.sh -y ${YAMLS} -t ${GIT_HASH} ${RUNTESTS})
COMMAND bash ${HOMEgfs}/workflow/generate_workflows.sh -H ${HOMEgfs} -y ${YAMLS} -t ${GIT_HASH} ${RUNTESTS})
2 changes: 1 addition & 1 deletion workflow/generate_workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ echo "Running create_experiment.py for ${#_yaml_list[@]} cases"
for _case in "${_yaml_list[@]}"; do
[[ "${_verbose}" == false ]] && echo "${_case}"
_pslot="${_case}${_tag}"
_create_exp_cmd="./create_experiment.py -y ../ci/cases/pr/${_case}.yaml --overwrite"
_create_exp_cmd="${HOMEgfs}/workflow/create_experiment.py -y ${HOMEgfs}/ci/cases/pr/${_case}.yaml --overwrite"
if [[ "${_verbose}" == true ]]; then
pslot=${_pslot} RUNTESTS=${_runtests} ${_create_exp_cmd}
else
Expand Down

0 comments on commit 61fcf83

Please sign in to comment.