Commit 4e5016ee authored by Uwe Schulzweida's avatar Uwe Schulzweida

Added test/Merge.test.in.

parent 0cd6ec59
Pipeline #5714 passed with stages
in 14 minutes and 56 seconds
...@@ -223,6 +223,7 @@ AC_CONFIG_FILES([ ...@@ -223,6 +223,7 @@ AC_CONFIG_FILES([
test/Inttime.test test/Inttime.test
test/Isosurface.test test/Isosurface.test
test/MapReduce.test test/MapReduce.test
test/Merge.test
test/Mergetime.test test/Mergetime.test
test/Merstat.test test/Merstat.test
test/Monarith.test test/Monarith.test
......
...@@ -43,6 +43,7 @@ TESTS =\ ...@@ -43,6 +43,7 @@ TESTS =\
Inttime.test \ Inttime.test \
Isosurface.test \ Isosurface.test \
MapReduce.test \ MapReduce.test \
Merge.test \
Mergetime.test \ Mergetime.test \
Merstat.test \ Merstat.test \
Monarith.test \ Monarith.test \
......
#! @BASH@
#
echo 1..1 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
test -n "$DATAPATH" || DATAPATH="@abs_top_srcdir@/test/data/"
#
FORMAT="-f srv -b 32"
#
IFILE=$DATAPATH/pl_data
IFILES="code130.srv code152.srv code129.srv"
$CDO splitcode $IFILE code
#
NTEST=1
#
OPERATOR="merge"
#
if [ -z "$1" ] || [ $NTEST == $1 ]; then
RSTAT=0
RFILE=$DATAPATH/pl_data
OFILE=merge_res
CDOTEST="$OPERATOR"
CDOCOMMAND="$CDO $FORMAT $OPERATOR $IFILES $OFILE"
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff $OFILE $RFILE
test $? -eq 0 || let RSTAT+=1
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
rm -f $OFILE $IFILES
fi
let NTEST+=1
#
exit 0
#! @BASH@ #! @BASH@
#
echo 1..2 # Number of tests to be executed. echo 1..2 # Number of tests to be executed.
# #
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG" test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
...@@ -11,18 +12,19 @@ IFILE2=$DATAPATH/mergetime_y12 ...@@ -11,18 +12,19 @@ IFILE2=$DATAPATH/mergetime_y12
# #
NTEST=1 NTEST=1
# #
STATS="mergetime" OPERATOR="mergetime"
#
for X in 1 2; do for X in 1 2; do
if [ -z "$1" ] || [ $NTEST == $1 ]; then if [ -z "$1" ] || [ $NTEST == $1 ]; then
RSTAT=0 RSTAT=0
RFILE=$DATAPATH/mergetime_ref RFILE=$DATAPATH/mergetime_ref
OFILE=mergetime_res OFILE=mergetime_res
CDOTEST="$STATS" CDOTEST="$OPERATOR"
if [ "$X" = "1" ] ; then if [ "$X" = "1" ] ; then
CDOCOMMAND="$CDO $FORMAT $STATS $IFILE1 $IFILE2 $OFILE" CDOCOMMAND="$CDO $FORMAT $OPERATOR $IFILE1 $IFILE2 $OFILE"
else else
CDOCOMMAND="$CDO $FORMAT $STATS $IFILE2 $IFILE1 $OFILE" CDOCOMMAND="$CDO $FORMAT $OPERATOR $IFILE2 $IFILE1 $OFILE"
fi fi
echo "Running test: $NTEST" echo "Running test: $NTEST"
......
Markdown is supported
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