Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions tests/rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ usage() {
echo " -c create new baseline results"
echo " -e use ecFlow workflow manager"
echo " -h display this help"
echo " -k keep run directory"
echo " -k keep run directory after rt.sh is completed"
echo " -l runs test specified in <file>"
echo " -m compare against new baseline results"
echo " -n run single test <name>"
echo " -r use Rocoto workflow manager"
echo " -w for weekly_test, skip comparing baseline results"
echo " -d delete run direcotries that are not used by other tests"
echo
set -x
exit 1
Expand Down Expand Up @@ -411,10 +412,11 @@ KEEP_RUNDIR=false
SINGLE_NAME=''
TEST_35D=false
export skip_check_results=false
export delete_rundir=false

TESTS_FILE='rt.conf'

while getopts ":cl:mn:wkreh" opt; do
while getopts ":cl:mn:dwkreh" opt; do
case $opt in
c)
CREATE_BASELINE=true
Expand All @@ -431,6 +433,9 @@ while getopts ":cl:mn:wkreh" opt; do
TESTS_FILE='rt.conf.single'
rm -f $TESTS_FILE
;;
d)
export delete_rundir=true
;;
w)
export skip_check_results=true
;;
Expand Down Expand Up @@ -459,6 +464,8 @@ while getopts ":cl:mn:wkreh" opt; do
esac
done

awk -F "|" '{print $5}' rt.conf | grep "\S" > keep_tests.tmp

if [[ $SINGLE_NAME != '' ]]; then
rt_single
fi
Expand Down Expand Up @@ -800,6 +807,7 @@ EOF
export LOG_DIR=${LOG_DIR}
export DEP_RUN=${DEP_RUN}
export skip_check_results=${skip_check_results}
export delete_rundir=${delete_rundir}
EOF

if [[ $ROCOTO == true ]]; then
Expand Down Expand Up @@ -864,7 +872,7 @@ else
echo ; echo REGRESSION TEST WAS SUCCESSFUL
(echo ; echo REGRESSION TEST WAS SUCCESSFUL) >> ${REGRESSIONTEST_LOG}

rm -f fv3_*.x fv3_*.exe modules.fv3_*
rm -f fv3_*.x fv3_*.exe modules.fv3_* keep_tests.tmp
[[ ${KEEP_RUNDIR} == false ]] && rm -rf ${RUNDIR_ROOT}
[[ ${ROCOTO} == true ]] && rm -f ${ROCOTO_XML} ${ROCOTO_DB} *_lock.db
[[ ${TEST_35D} == true ]] && rm -f tests/cpld_bmark*_20*
Expand Down
2 changes: 1 addition & 1 deletion tests/rt_weekly.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ COMPILE | -DAPP=ATM -DCCPP_SUITES=FV3_GFS_v16,FV3_GFS_v16_nsstNoahmpUGWPv1 -D32B
RUN | control_c768 | - wcoss_cray | fv3 |

# CPLD Benchmark 35d tests
# The length of forecast is one day for the weekly tests.
# The length of forecast is 5 days for the weekly tests.
COMPILE | -DAPP=S2SW -DCCPP_SUITES=FV3_GFS_v16_coupled_p8 | + hera.intel | fv3 | |
RUN | cpld_bmark_p8_35d | | fv3 | | 2012010100
RUN | cpld_bmark_p8_35d | | fv3 | | 2012040100
Expand Down
17 changes: 17 additions & 0 deletions tests/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -266,5 +266,22 @@ fi

echo " $( date +%s )" >> ${LOG_DIR}/job_${JOB_NR}_timestamp.txt

################################################################################
# Remove RUN_DIRs if they are no longer needed by other tests
################################################################################
if [[ ${delete_rundir} = true ]]; then
keep_run_dir=false
while read -r line; do
keep_test=$(echo $line| sed -e 's/^ *//' -e 's/ *$//')
if [[ $TEST_NAME == ${keep_test} ]]; then
keep_run_dir=true
fi
done < ${PATHRT}/keep_tests.tmp

if [[ ${keep_run_dir} == false ]]; then
rm -rf ${RUNDIR}
fi
fi

elapsed=$SECONDS
echo "Elapsed time $elapsed seconds. Test ${TEST_NAME}"