From 00068d924babe78bf22c1290deeddb8430f00660 Mon Sep 17 00:00:00 2001 From: Jiarui Dong Date: Mon, 14 Aug 2023 11:43:42 -0400 Subject: [PATCH] Add test_bufr2ioda.sh for adpsfc_snow ctest. --- test/land/test_bufr2ioda.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 test/land/test_bufr2ioda.sh diff --git a/test/land/test_bufr2ioda.sh b/test/land/test_bufr2ioda.sh new file mode 100755 index 000000000..f21e30f2f --- /dev/null +++ b/test/land/test_bufr2ioda.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -x + +PROJECT_BINARY_DIR=${1} +OBSSOURCE=${2} +CMD=${PROJECT_BINARY_DIR}/bin/bufr2ioda.x +OBSYAML=${PROJECT_BINARY_DIR}/../ush/land/${OBSSOURCE}.yaml + +OUTFILE=`grep obsdataout ${OBSYAML} | cut -d'"' -f2` + +echo "the following might not exist" +rm -v ${PROJECT_BINARY_DIR}/test/${OUTFILE} + +${CMD} ${OBSYAML} +rc=$? + +ls ${PROJECT_BINARY_DIR}/test/${OUTFILE} +ra=$? +rc=$((rc+ra)) + +export err=$rc + +exit $err