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
18 changes: 13 additions & 5 deletions tests/run_compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ write_fail_test() {
exit 1
}

remove_fail_test() {
echo "Removing test failure flag file for compile_${COMPILE_NR}"
if [[ ${OPNREQ_TEST} == true ]] ; then
rm -f $PATHRT/fail_opnreq_compile_${COMPILE_NR}
else
rm -f $PATHRT/fail_compile_${COMPILE_NR}
fi
}

if [[ $# != 4 ]]; then
echo "Usage: $0 PATHRT RUNDIR_ROOT MAKE_OPT COMPILE_NR"
exit 1
Expand All @@ -35,11 +44,7 @@ export COMPILE_NR=$4

cd ${PATHRT}
OPNREQ_TEST=${OPNREQ_TEST:-false}
if [[ ${OPNREQ_TEST} == true ]]; then
rm -f fail_opnreq_compile_${COMPILE_NR}
else
rm -f fail_compile_${COMPILE_NR}
fi
remove_fail_test

[[ -e ${RUNDIR_ROOT}/compile_${COMPILE_NR}.env ]] && source ${RUNDIR_ROOT}/compile_${COMPILE_NR}.env
source default_vars.sh
Expand Down Expand Up @@ -85,6 +90,9 @@ ls -l ${PATHTR}/tests/fv3_${COMPILE_NR}.exe

cp ${RUNDIR}/compile_*_time.log ${LOG_DIR}
cat ${RUNDIR}/job_timestamp.txt >> ${LOG_DIR}/job_${JOB_NR}_timestamp.txt

remove_fail_test

################################################################################
# End compile job
################################################################################
Expand Down
18 changes: 13 additions & 5 deletions tests/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ write_fail_test() {
exit 1
}

remove_fail_test() {
echo "Removing test failure flag file for ${TEST_NAME} ${TEST_NR}"
if [[ ${OPNREQ_TEST} == true ]] ; then
rm -f $PATHRT/fail_opnreq_test_${TEST_NR}
else
rm -f $PATHRT/fail_test_${TEST_NR}
fi
}

function compute_petbounds() {

# each test MUST define ${COMPONENT}_tasks variable for all components it is using
Expand Down Expand Up @@ -90,11 +99,7 @@ export COMPILE_NR=$5

cd ${PATHRT}
OPNREQ_TEST=${OPNREQ_TEST:-false}
if [[ ${OPNREQ_TEST} == true ]]; then
rm -f fail_opnreq_test_${TEST_NR}
else
rm -f fail_test_${TEST_NR}
fi
remove_fail_test

[[ -e ${RUNDIR_ROOT}/run_test_${TEST_NR}.env ]] && source ${RUNDIR_ROOT}/run_test_${TEST_NR}.env
source default_vars.sh
Expand Down Expand Up @@ -356,6 +361,9 @@ fi
if [[ $SCHEDULER != 'none' ]]; then
cat ${RUNDIR}/job_timestamp.txt >> ${LOG_DIR}/job_${JOB_NR}_timestamp.txt
fi

remove_fail_test

################################################################################
# End test
################################################################################
Expand Down