Commit 0fa82fc7 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

added Expr.test

parent 8c958002
...@@ -723,6 +723,7 @@ test/Copy_netcdf.test.in -text ...@@ -723,6 +723,7 @@ test/Copy_netcdf.test.in -text
test/Detrend.test.in -text test/Detrend.test.in -text
test/Enspctl.test.in -text test/Enspctl.test.in -text
test/Ensstat.test.in -text test/Ensstat.test.in -text
test/Expr.test.in -text
test/File.test.in -text test/File.test.in -text
test/Fldpctl.test.in -text test/Fldpctl.test.in -text
test/Fldstat.test.in -text test/Fldstat.test.in -text
...@@ -743,6 +744,8 @@ test/Ymonstat.test.in -text ...@@ -743,6 +744,8 @@ test/Ymonstat.test.in -text
test/bm_Remap.sh -text test/bm_Remap.sh -text
test/data/Makefile.am -text test/data/Makefile.am -text
test/data/Makefile.in -text test/data/Makefile.in -text
test/data/aexpr1_ref -text
test/data/aexpr2_ref -text
test/data/bathy4.grb -text test/data/bathy4.grb -text
test/data/datac.nc -text test/data/datac.nc -text
test/data/datag.nc -text test/data/datag.nc -text
...@@ -760,6 +763,8 @@ test/data/enspctl66_ref -text ...@@ -760,6 +763,8 @@ test/data/enspctl66_ref -text
test/data/enspctl75_ref -text test/data/enspctl75_ref -text
test/data/enspctl80_ref -text test/data/enspctl80_ref -text
test/data/enspctl99_ref -text test/data/enspctl99_ref -text
test/data/expr1_ref -text
test/data/expr2_ref -text
test/data/file_F32_srv_ref -text test/data/file_F32_srv_ref -text
test/data/fldavg_ref -text test/data/fldavg_ref -text
test/data/fldmax_ref -text test/data/fldmax_ref -text
......
...@@ -21257,9 +21257,9 @@ ac_config_files="$ac_config_files test/Select.test test/Spectral.test test/Timst ...@@ -21257,9 +21257,9 @@ ac_config_files="$ac_config_files test/Select.test test/Spectral.test test/Timst
   
ac_config_files="$ac_config_files test/Ymonstat.test test/Fldstat.test test/Fldpctl.test test/Ensstat.test test/Enspctl.test" ac_config_files="$ac_config_files test/Ymonstat.test test/Fldstat.test test/Fldpctl.test test/Ensstat.test test/Enspctl.test"
   
ac_config_files="$ac_config_files test/Afterburner.test test/Detrend.test test/Arith.test test/Gradsdes.test" ac_config_files="$ac_config_files test/Afterburner.test test/Detrend.test test/Arith.test test/Expr.test"
   
ac_config_files="$ac_config_files test/Collgrid.test test/wildcard.test" ac_config_files="$ac_config_files test/Gradsdes.test test/Collgrid.test test/wildcard.test"
   
ac_config_files="$ac_config_files Makefile src/Makefile contrib/Makefile test/Makefile test/data/Makefile cdo.spec cdo.settings" ac_config_files="$ac_config_files Makefile src/Makefile contrib/Makefile test/Makefile test/data/Makefile cdo.spec cdo.settings"
   
...@@ -22430,6 +22430,7 @@ do ...@@ -22430,6 +22430,7 @@ do
"test/Afterburner.test") CONFIG_FILES="$CONFIG_FILES test/Afterburner.test" ;; "test/Afterburner.test") CONFIG_FILES="$CONFIG_FILES test/Afterburner.test" ;;
"test/Detrend.test") CONFIG_FILES="$CONFIG_FILES test/Detrend.test" ;; "test/Detrend.test") CONFIG_FILES="$CONFIG_FILES test/Detrend.test" ;;
"test/Arith.test") CONFIG_FILES="$CONFIG_FILES test/Arith.test" ;; "test/Arith.test") CONFIG_FILES="$CONFIG_FILES test/Arith.test" ;;
"test/Expr.test") CONFIG_FILES="$CONFIG_FILES test/Expr.test" ;;
"test/Gradsdes.test") CONFIG_FILES="$CONFIG_FILES test/Gradsdes.test" ;; "test/Gradsdes.test") CONFIG_FILES="$CONFIG_FILES test/Gradsdes.test" ;;
"test/Collgrid.test") CONFIG_FILES="$CONFIG_FILES test/Collgrid.test" ;; "test/Collgrid.test") CONFIG_FILES="$CONFIG_FILES test/Collgrid.test" ;;
"test/wildcard.test") CONFIG_FILES="$CONFIG_FILES test/wildcard.test" ;; "test/wildcard.test") CONFIG_FILES="$CONFIG_FILES test/wildcard.test" ;;
...@@ -23945,6 +23946,7 @@ _LT_EOF ...@@ -23945,6 +23946,7 @@ _LT_EOF
"test/Afterburner.test":F) chmod a+x "$ac_file" ;; "test/Afterburner.test":F) chmod a+x "$ac_file" ;;
"test/Detrend.test":F) chmod a+x "$ac_file" ;; "test/Detrend.test":F) chmod a+x "$ac_file" ;;
"test/Arith.test":F) chmod a+x "$ac_file" ;; "test/Arith.test":F) chmod a+x "$ac_file" ;;
"test/Expr.test":F) chmod a+x "$ac_file" ;;
"test/Gradsdes.test":F) chmod a+x "$ac_file" ;; "test/Gradsdes.test":F) chmod a+x "$ac_file" ;;
"test/Collgrid.test":F) chmod a+x "$ac_file" ;; "test/Collgrid.test":F) chmod a+x "$ac_file" ;;
"test/wildcard.test":F) chmod a+x "$ac_file" ;; "test/wildcard.test":F) chmod a+x "$ac_file" ;;
......
...@@ -246,8 +246,8 @@ AC_CONFIG_FILES([test/File.test test/Read_grib.test test/Read_netcdf.test test/C ...@@ -246,8 +246,8 @@ AC_CONFIG_FILES([test/File.test test/Read_grib.test test/Read_netcdf.test test/C
AC_CONFIG_FILES([test/Cat.test test/Gridarea.test test/Genweights.test test/Remap.test],[chmod a+x "$ac_file"]) AC_CONFIG_FILES([test/Cat.test test/Gridarea.test test/Genweights.test test/Remap.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Select.test test/Spectral.test test/Timstat.test test/Vertint.test],[chmod a+x "$ac_file"]) AC_CONFIG_FILES([test/Select.test test/Spectral.test test/Timstat.test test/Vertint.test],[chmod a+x "$ac_file"])
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/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/Gradsdes.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/Collgrid.test test/wildcard.test],[chmod a+x "$ac_file"]) AC_CONFIG_FILES([test/Gradsdes.test test/Collgrid.test test/wildcard.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([Makefile src/Makefile contrib/Makefile test/Makefile test/data/Makefile cdo.spec cdo.settings]) AC_CONFIG_FILES([Makefile src/Makefile contrib/Makefile test/Makefile test/data/Makefile cdo.spec cdo.settings])
AC_OUTPUT AC_OUTPUT
......
#! @SHELL@
echo 1..2 # Number of tests to be executed.
#
test -n "$CDO" || CDO=cdo
test -n "$DATAPATH" || DATAPATH=./data
#
CDOOUT=cout
CDOERR=cerr
FORMAT="-f srv -b 32"
STATS="add sub mul div"
#
IFILE=$DATAPATH/pl_data
NTEST=1
#
INSETS="_clev=1/var130.z;var1=var130*_clev;"
INSETS="$INSETS var1=(var129>0)?(var130-273.15):var152;"
FINSTR=finstr
#
for INSTR in $INSETS; do
RSTAT=0
CDOTEST="instruction set $NTEST"
echo "Running test: $NTEST - $CDOTEST"
for EXPR in expr aexpr; do
RFILE=$DATAPATH/${EXPR}${NTEST}_ref
OFILE=${EXPR}${NTEST}_res
for FILE in "" "f"; do
if [ "$FILE" = "f" ] ; then
echo $INSTR > $FINSTR
CDOCOMMAND="$CDO $FORMAT $EXPR${FILE},$FINSTR $IFILE $OFILE"
else
CDOCOMMAND="$CDO $FORMAT $EXPR,$INSTR $IFILE $OFILE"
fi
echo "$CDOCOMMAND"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff $RFILE $OFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
rm -f $OFILE $FINSTR
done
done
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
let NTEST+=1
done
#
rm -f $CDOOUT $CDOERR
#
exit 0
...@@ -13,8 +13,8 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ ...@@ -13,8 +13,8 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
# tests which should pass # tests which should pass
TESTS = File.test Read_grib.test Read_netcdf.test Copy_netcdf.test Cat.test Gridarea.test Detrend.test \ TESTS = 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 \ 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 Gradsdes.test \ Enspctl.test Fldstat.test Fldpctl.test Vertint.test Afterburner.test Arith.test Expr.test \
Collgrid.test wildcard.test Gradsdes.test Collgrid.test wildcard.test
# tests which should fail # tests which should fail
XFAIL_TESTS = XFAIL_TESTS =
......
...@@ -90,8 +90,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ ...@@ -90,8 +90,9 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/Fldstat.test.in $(srcdir)/Fldpctl.test.in \ $(srcdir)/Fldstat.test.in $(srcdir)/Fldpctl.test.in \
$(srcdir)/Ensstat.test.in $(srcdir)/Enspctl.test.in \ $(srcdir)/Ensstat.test.in $(srcdir)/Enspctl.test.in \
$(srcdir)/Afterburner.test.in $(srcdir)/Detrend.test.in \ $(srcdir)/Afterburner.test.in $(srcdir)/Detrend.test.in \
$(srcdir)/Arith.test.in $(srcdir)/Gradsdes.test.in \ $(srcdir)/Arith.test.in $(srcdir)/Expr.test.in \
$(srcdir)/Collgrid.test.in $(srcdir)/wildcard.test.in README $(srcdir)/Gradsdes.test.in $(srcdir)/Collgrid.test.in \
$(srcdir)/wildcard.test.in README
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
...@@ -107,7 +108,7 @@ CONFIG_CLEAN_FILES = File.test Read_grib.test Read_netcdf.test \ ...@@ -107,7 +108,7 @@ CONFIG_CLEAN_FILES = File.test Read_grib.test Read_netcdf.test \
Remap.test Select.test Spectral.test Timstat.test Vertint.test \ Remap.test Select.test Spectral.test Timstat.test Vertint.test \
Ymonstat.test Fldstat.test Fldpctl.test Ensstat.test \ Ymonstat.test Fldstat.test Fldpctl.test Ensstat.test \
Enspctl.test Afterburner.test Detrend.test Arith.test \ Enspctl.test Afterburner.test Detrend.test Arith.test \
Gradsdes.test Collgrid.test wildcard.test Expr.test Gradsdes.test Collgrid.test wildcard.test
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@) AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
...@@ -519,8 +520,8 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ ...@@ -519,8 +520,8 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
# tests which should pass # tests which should pass
TESTS = File.test Read_grib.test Read_netcdf.test Copy_netcdf.test Cat.test Gridarea.test Detrend.test \ TESTS = 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 \ 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 Gradsdes.test \ Enspctl.test Fldstat.test Fldpctl.test Vertint.test Afterburner.test Arith.test Expr.test \
Collgrid.test wildcard.test Gradsdes.test Collgrid.test wildcard.test
# $(top_srcdir)/test/test_Remap.sh \ # $(top_srcdir)/test/test_Remap.sh \
...@@ -609,6 +610,8 @@ Detrend.test: $(top_builddir)/config.status $(srcdir)/Detrend.test.in ...@@ -609,6 +610,8 @@ Detrend.test: $(top_builddir)/config.status $(srcdir)/Detrend.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Arith.test: $(top_builddir)/config.status $(srcdir)/Arith.test.in Arith.test: $(top_builddir)/config.status $(srcdir)/Arith.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Expr.test: $(top_builddir)/config.status $(srcdir)/Expr.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Gradsdes.test: $(top_builddir)/config.status $(srcdir)/Gradsdes.test.in Gradsdes.test: $(top_builddir)/config.status $(srcdir)/Gradsdes.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Collgrid.test: $(top_builddir)/config.status $(srcdir)/Collgrid.test.in Collgrid.test: $(top_builddir)/config.status $(srcdir)/Collgrid.test.in
......
...@@ -16,6 +16,7 @@ REMAP_REF = n16_bic_ref n16_bil_ref n16_con_ref n16_ycon_ref n16_laf_ref n16_ ...@@ -16,6 +16,7 @@ REMAP_REF = n16_bic_ref n16_bil_ref n16_con_ref n16_ycon_ref n16_laf_ref n16_
n32_bic_ref n32_bil_ref n32_con_ref n32_ycon_ref n32_laf_ref n32_nn_ref n32_dis_ref n32_bic_ref n32_bil_ref n32_con_ref n32_ycon_ref n32_laf_ref n32_nn_ref n32_dis_ref
SELECT_REF = select1_ref select2_ref select3_ref select4_ref select5_ref SELECT_REF = select1_ref select2_ref select3_ref select4_ref select5_ref
DETREND_REF = detrend_ref DETREND_REF = detrend_ref
EXPR_REF = expr1_ref aexpr1_ref expr2_ref aexpr2_ref
GRADSDES_REF = pl_data.ctl pl_data.gmp GRADSDES_REF = pl_data.ctl pl_data.gmp
EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(YMONSTAT_REF) $(TIMSTAT_REF) $(FLDSTAT_REF) $(FLDPSTAT_REF) $(ENSPSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF) $(DETREND_REF) $(GRADSDES_REF) EXTRA_DIST = $(INPUTDATA) $(FILE_REF) $(GRIB_REF) $(NETCDF_REF) $(YMONSTAT_REF) $(TIMSTAT_REF) $(FLDSTAT_REF) $(FLDPSTAT_REF) $(ENSPSTAT_REF) $(SPECTRAL_REF) $(VERTINT_REF) $(REMAP_REF) $(SELECT_REF) $(DETREND_REF) $(EXPR_REF) $(GRADSDES_REF)
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