From 0a95b04473240c342e8f8551c92e66dc148a62af Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 26 Jul 2016 14:35:21 -0600 Subject: [PATCH] component_compare_test should fail if one of the components to be compared is not found" --- scripts/Tools/component_compare_test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/Tools/component_compare_test.sh b/scripts/Tools/component_compare_test.sh index 2ad52bdfc60b..df921672792a 100755 --- a/scripts/Tools/component_compare_test.sh +++ b/scripts/Tools/component_compare_test.sh @@ -27,7 +27,7 @@ function Usage { echo "" echo " -suffix1 Suffix to attach to first file to compare" echo "" - echo " -suffix1 Suffix to attach to second file to compare" + echo " -suffix2 Suffix to attach to second file to compare" echo "" echo " -help Print this help message and exit" echo "" @@ -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"` @@ -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