Commit 15986ce3 authored by Ralf Mueller's avatar Ralf Mueller
Browse files

add test for ngridpoints

parent 685232f0
......@@ -733,6 +733,7 @@ test/Gridarea.test.in -text
test/Makefile.am -text
test/Makefile.in -text
test/MapReduce.test.in -text
test/Ninfo.test.in -text
test/README -text
test/Read_grib.test.in -text
test/Read_netcdf.test.in -text
......
......@@ -253,7 +253,7 @@ AC_CONFIG_FILES([test/Select.test test/Spectral.test test/Timstat.test test/Vert
AC_CONFIG_FILES([test/Ymonstat.test test/Fldstat.test test/Fldpctl.test test/Ensstat.test test/Enspctl.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Afterburner.test test/Detrend.test test/Arith.test test/Expr.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Gradsdes.test test/Collgrid.test test/threads.test test/wildcard.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/MapReduce.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/MapReduce.test test/Ninfo.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([Makefile src/Makefile contrib/Makefile test/Makefile test/data/Makefile cdo.spec cdo.settings])
AC_OUTPUT
......
......@@ -14,7 +14,7 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
TESTS = threads.test wildcard.test File.test Read_grib.test Read_netcdf.test Copy_netcdf.test Cat.test Gridarea.test Detrend.test \
Genweights.test Remap.test Select.test Spectral.test Ymonstat.test Timstat.test Ensstat.test \
Enspctl.test Fldstat.test Fldpctl.test Vertint.test Afterburner.test Arith.test Expr.test \
Gradsdes.test Collgrid.test MapReduce.test
Gradsdes.test Collgrid.test MapReduce.test Ninfo.test
# tests which should fail
XFAIL_TESTS =
......
#! @SHELL@
echo 1..5 # Number of tests to be executed.
#
test -n "$CDO" || CDO=cdo
#
NTEST=1
#
for OPERATOR in reducegrid; do
for grid in r18x9 ni4 ni96 global_10 t63grid; do
RSTAT=0
CDOTEST="$OPERATOR on grid ${grid}"
CDOCOMMAND="$CDO -s -ngridpoints -topo,${grid}"
echo "$CDOCOMMAND"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
case $grid in
r18x9)
if test 162 -eq $($CDOCOMMAND) ; then echo "ok $NTEST - $CDOTEST"; else echo "not ok $NTEST - $CDOTEST"; fi
;;
ni4)
if test 250 -eq $($CDOCOMMAND) ; then echo "ok $NTEST - $CDOTEST"; else echo "not ok $NTEST - $CDOTEST"; fi
;;
ni96)
if test 94090 -eq $($CDOCOMMAND) ; then echo "ok $NTEST - $CDOTEST"; else echo "not ok $NTEST - $CDOTEST"; fi
;;
global_10)
if test 648 -eq $($CDOCOMMAND) ; then echo "ok $NTEST - $CDOTEST"; else echo "not ok $NTEST - $CDOTEST"; fi
;;
t63grid)
if test 18432 -eq $($CDOCOMMAND) ; then echo "ok $NTEST - $CDOTEST"; else echo "not ok $NTEST - $CDOTEST"; fi
;;
esac
let NTEST+=1
done
done
#
exit 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment