Commit c5e8e6ea authored by Yvonne Kuestermann's avatar Yvonne Kuestermann
Browse files

added shell test for inputfiles

parent b6dae560
......@@ -779,6 +779,7 @@ test/grid_search/tests.c -text
test/grid_search/tests.h -text
test/grid_search/utils.c -text
test/grid_search/utils.h -text
test/inputfiles.test.in -text
test/testStreams.py -text
test/test_Arith.py -text
test/test_Arithc.py -text
......
......@@ -21025,6 +21025,8 @@ ac_config_files="$ac_config_files test/Select.test test/Spectral.test test/Timst
 
ac_config_files="$ac_config_files test/Detrend.test test/Arith.test"
 
ac_config_files="$ac_config_files test/inputfiles.test"
ac_config_files="$ac_config_files Makefile src/Makefile contrib/Makefile test/Makefile test/data/Makefile cdo.spec cdo.settings"
 
cat >confcache <<\_ACEOF
......@@ -22188,6 +22190,7 @@ do
"test/Vertint.test") CONFIG_FILES="$CONFIG_FILES test/Vertint.test" ;;
"test/Detrend.test") CONFIG_FILES="$CONFIG_FILES test/Detrend.test" ;;
"test/Arith.test") CONFIG_FILES="$CONFIG_FILES test/Arith.test" ;;
"test/inputfiles.test") CONFIG_FILES="$CONFIG_FILES test/inputfiles.test" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;;
......@@ -23694,6 +23697,7 @@ _LT_EOF
"test/Vertint.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/inputfiles.test":F) chmod a+x "$ac_file" ;;
 
esac
done # for ac_tag
......
......@@ -226,6 +226,7 @@ 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/Select.test test/Spectral.test test/Timstat.test test/Vertint.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/Detrend.test test/Arith.test],[chmod a+x "$ac_file"])
AC_CONFIG_FILES([test/inputfiles.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
......
......@@ -623,7 +623,6 @@ int expand_wildcards(int processID, int streamCnt)
for ( i = 0; i < glob_arg->argc; ++i )
{
// printf("add %d %s\n", i, glob_arg->argv[i]);
Process[processID].streamNames[i].argv = (char **) malloc(sizeof(char *));
Process[processID].streamNames[i].argc = 1;
Process[processID].streamNames[i].argv[0] = strdupx(glob_arg->argv[i]);
......
......@@ -12,7 +12,8 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
# tests which should pass
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 Timstat.test Vertint.test Arith.test
Genweights.test Remap.test Select.test Spectral.test Timstat.test Vertint.test Arith.test \
inputfiles.test
# tests which should fail
XFAIL_TESTS =
......
......@@ -87,7 +87,7 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/Remap.test.in $(srcdir)/Select.test.in \
$(srcdir)/Spectral.test.in $(srcdir)/Timstat.test.in \
$(srcdir)/Vertint.test.in $(srcdir)/Detrend.test.in \
$(srcdir)/Arith.test.in README
$(srcdir)/Arith.test.in $(srcdir)/inputfiles.test.in README
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_options.m4 \
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
......@@ -101,7 +101,7 @@ CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES = File.test Read_grib.test Read_netcdf.test \
Copy_netcdf.test Cat.test Gridarea.test Genweights.test \
Remap.test Select.test Spectral.test Timstat.test Vertint.test \
Detrend.test Arith.test
Detrend.test Arith.test inputfiles.test
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
......@@ -510,7 +510,8 @@ TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
# tests which should pass
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 Timstat.test Vertint.test Arith.test
Genweights.test Remap.test Select.test Spectral.test Timstat.test Vertint.test Arith.test \
inputfiles.test
# $(top_srcdir)/test/test_Remap.sh \
......@@ -587,6 +588,8 @@ Detrend.test: $(top_builddir)/config.status $(srcdir)/Detrend.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
Arith.test: $(top_builddir)/config.status $(srcdir)/Arith.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
inputfiles.test: $(top_builddir)/config.status $(srcdir)/inputfiles.test.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool:
-rm -f *.lo
......
#! @SHELL@
# Checks whether cdo handles the inputargument right,
# most of the operators accept only one input argument.
# If you want to feed several inputfiles you can escape the files
# to make them one argument.
echo 1..4 # Number of tests to be executed.
#
test -n "$CDO" || CDO='cdo'
test -n "$DATAPATH" || DATAPATH=./data
#
IFILE1="$DATAPATH/*.grb"
IFILE2="$DATAPATH/bathy4.grb"
#IFILE3="$DATAPATH/grib_testfile01.grb $DATAPATH/bathy4.grb"
CDOOUT=cout
CDOERR=cerr
#
NTEST=1
#
for OPERATOR in info sinfo; do
for IFILE in "$IFILE1" "$IFILE2"; do
RSTAT=0
CDOTEST="$OPERATOR '$IFILE'"
echo "Running test: $NTEST"
ENABLED_TEST=yes
CDOCOMMAND="$CDO ${OPERATOR} '$IFILE'"
echo "$CDOCOMMAND"
eval $CDOCOMMAND > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
cat $CDOOUT $CDOERR
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
let NTEST+=1
done
done
#
rm -f $CDOOUT $CDOERR
#
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