Skip to content

Commit

Permalink
bug fix to failed test detection with rocoto
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelTrahanNOAA committed Jul 6, 2024
1 parent f816cd2 commit bacf7a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions tests/rt_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@ check_results() {

if [[ ${test_status} = 'FAIL' ]]; then
echo "${TEST_ID} failed in check_result" >> "${PATHRT}/fail_test_${TEST_ID}"
return 1
else
return 0
fi
}

Expand Down
7 changes: 5 additions & 2 deletions tests/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,11 @@ else

fi
skip_check_results=${skip_check_results:-false}
results_okay=YES
if [[ ${skip_check_results} = false ]]; then
check_results
if ( ! check_results ) ; then
results_okay=NO
fi
else
{
echo
Expand All @@ -422,7 +425,7 @@ if [[ ${SCHEDULER} != 'none' ]]; then
cat "${RUNDIR}/job_timestamp.txt" >> "${LOG_DIR}/${JBNME}_timestamp.txt"
fi

if [[ ${ROCOTO} = true ]]; then
if [[ ${results_okay} == YES ]]; then
remove_fail_test
fi

Expand Down

0 comments on commit bacf7a9

Please sign in to comment.