Skip to content

Commit

Permalink
component_compare_test should fail if one of the components to be com…
Browse files Browse the repository at this point in the history
…pared is not found"
  • Loading branch information
jedwards4b committed Jul 26, 2016
1 parent a796384 commit 0a95b04
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/Tools/component_compare_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function Usage {
echo ""
echo " -suffix1 <name> Suffix to attach to first file to compare"
echo ""
echo " -suffix1 <name> Suffix to attach to second file to compare"
echo " -suffix2 <name> Suffix to attach to second file to compare"
echo ""
echo " -help Print this help message and exit"
echo ""
Expand Down Expand Up @@ -365,6 +365,7 @@ for model in ${models[*]}; do
# No _IOP_ or _N2_ attributes or multi-instance NCK_ or NCR_ tests
hist1=`cd $rundir; ls -1 ${testcase}.${model}.${extension}.*.nc.${suffix1} 2>/dev/null | tail -1`
hist2=`cd $rundir; ls -1 ${testcase}.${model}.${extension}.*.nc.${suffix2} 2>/dev/null | tail -1`

if [[ -f ${hist1} ]] && [[ -f ${hist2} ]] ; then
compare_result=`${tools_dir}/component_compare.sh -baseline_dir "$rundir" -test_dir "$rundir" -baseline_hist "$hist1" -test_hist "$hist2" -cprnc_exe "$cprnc_exe"`
compare_status=`get_status "$compare_result"`
Expand All @@ -373,6 +374,9 @@ for model in ${models[*]}; do
if [ "$compare_status" != "PASS" ]; then
overall_status="FAIL"
fi
else
overall_status = "FAIL"
print_comment "File ${hist1} or ${hist2} not found"
fi

fi
Expand Down

0 comments on commit 0a95b04

Please sign in to comment.