Commit fd1c4b15 authored by Uwe Schulzweida's avatar Uwe Schulzweida

Include runTest.

parent e5db08fa
#! @BASH@
#
. ./cdoTestFunctions.test
#
echo 1..10 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
......@@ -21,19 +24,11 @@ for PCTL in $PCTLS; do
RFILE=$DATAPATH/enspctl${PCTL}_ref
OFILE=enspctl${STAT}_res
CDOTEST="enspctl,${PCTL}"
CDOTEST="$STATS ${PCTL}"
CDOCOMMAND="$CDO $STATS,${PCTL} $IFILES $OFILE"
TESTCOMMAND="$CDO diff $OFILE $RFILE"
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"
runTest "$NTEST" "$CDOTEST" "$CDOCOMMAND" "$TESTCOMMAND"
rm -f $OFILE
fi
let NTEST+=1
......
#! @BASH@
#
. ./cdoTestFunctions.test
#
echo 1..24 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
......@@ -32,20 +35,10 @@ for RUN in 1 2; do
fi
CDOCOMMAND="$CDO ${TYPE}${STAT} $IFILES $OFILE"
TESTCOMMAND="$CDO diff $OFILE $RFILE"
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff $OFILE $RFILE
test $? -eq 0 || let RSTAT+=1
runTest "$NTEST" "$CDOTEST" "$CDOCOMMAND" "$TESTCOMMAND"
rm -f $OFILE
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
fi
let NTEST+=1
done
......
#! @BASH@
echo 1..10 # Number of tests to be executed.
#
. ./cdoTestFunctions.test
#
echo 1..10 # 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/"
#
......@@ -18,7 +20,6 @@ echo "Running test: $NTEST"
#
for PCTL in $PCTLS; do
if [ -z "$1" ] || [ $NTEST == $1 ]; then
RFILE=$DATAPATH/fldpctl${PCTL}_ref
OFILE=fldpctl${STAT}_res
......@@ -27,9 +28,9 @@ for PCTL in $PCTLS; do
TESTCOMMAND="$CDO diff $OFILE $RFILE"
runTest "$NTEST" "$CDOTEST" "$CDOCOMMAND" "$TESTCOMMAND"
rm -f $OFILE
fi
let NTEST+=1
rm -f $OFILE
done
#
exit 0
#! @BASH@
#
. ./cdoTestFunctions.test
#
echo 1..10 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
......
#! @BASH@
#
. ./cdoTestFunctions.test
#
echo 1..10 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
......@@ -22,19 +25,7 @@ for TYPE in $OPERTYPES; do
CDOTEST="${TYPE}$STAT"
CDOCOMMAND="$CDO $FORMAT ${TYPE}${STAT},64,32 $IFILE $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"
runTest "$NTEST" "$CDOTEST" "$CDOCOMMAND" "$TESTCOMMAND"
rm -f $OFILE
fi
let NTEST+=1
......
#! @BASH@
#
. ./cdoTestFunctions.test
#
echo 1..10 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
......@@ -18,12 +20,12 @@ for STAT in $STATS; do
RSTAT=0
RFILE=$DATAPATH/${TYPE}${STAT}_ref
OFILE=${STAT}_res
CDOTEST="$STAT"
CDOCOMMAND="$CDO $FORMAT ${STAT} $IFILE $OFILE"
TESTCOMMAND="$CDO diff $OFILE $RFILE"
runTest "$NTEST" "$CDOTEST" "$CDOCOMMAND" "$TESTCOMMAND"
rm -f $OFILE
fi
let NTEST+=1
......
#! @BASH@
echo 1..1 # Number of tests to be executed.
#
. ./cdoTestFunctions.test
#
echo 1..10 # 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/"
......@@ -15,26 +18,17 @@ NTEST=1
RSTAT=0
#
for PCTL in $PCTLS; do
RFILE=$DATAPATH/runpctl${PCTL}_ref
OFILE=runpctl${STAT}_res
RFILE=$DATAPATH/runpctl${PCTL}_ref
OFILE=runpctl${STAT}_res
CDOTEST="runpctl$STAT"
CDOCOMMAND="$CDO $FORMAT $STATS,${PCTL},12 $IFILE $OFILE"
CDOTEST="$STAT $PCTL"
CDOCOMMAND="$CDO $FORMAT $STATS,${PCTL},12 $IFILE $OFILE"
TESTCOMMAND="$CDO diff,abslim=0.004 $OFILE $RFILE"
echo "$CDOCOMMAND"
runTest "$NTEST" "$CDOTEST" "$CDOCOMMAND" "$TESTCOMMAND"
rm -f $OFILE
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff,abslim=0.004 $OFILE $RFILE
test $? -eq 0 || let RSTAT+=1
rm -f $OFILE
let NTEST+=1
done
#
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
#
exit 0
#! @BASH@
#
. ./cdoTestFunctions.test
#
echo 1..8 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
......@@ -28,21 +31,10 @@ for STAT in $OPERTYPES; do
OFILE=${OPERATOR}${PCTL}_res
CDOTEST="${OPERATOR}"
CDOCOMMAND="$CDO $FORMAT ${OPERATOR},${PCTL} $IFILE $DATAPATH/${STAT}min_ref $DATAPATH/${STAT}max_ref $OFILE"
TESTCOMMAND="$CDO diff $OFILE $RFILE"
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"
runTest "$NTEST" "$CDOTEST" "$CDOCOMMAND" "$TESTCOMMAND"
rm -f $OFILE
fi
let NTEST+=1
......
#! @BASH@
#
. ./cdoTestFunctions.test
#
echo 1..2 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
......@@ -15,33 +18,24 @@ IFILE=$DATAPATH/ts_mm_5years
#
for NSETS in 12 60; do
#
if [ $NSETS -eq 12 ] ; then
RTYPE=year
elif [ $NSETS -eq 60 ] ; then
RTYPE=tim
fi
RSTAT=0
RFILE=$DATAPATH/${TYPE}${NSETS}pctl${PCTL}_ref
OFILE=${TYPE}${NSETS}pctl${PCTL}_res
CDOTEST="${TYPE}pctl nsets=${NSETS}"
CDOCOMMAND="$CDO $FORMAT ${TYPE}pctl,${PCTL},${NSETS} $IFILE $DATAPATH/${RTYPE}min_ref $DATAPATH/${RTYPE}max_ref $OFILE"
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
if [ $NSETS -eq 12 ] ; then
RTYPE=year
elif [ $NSETS -eq 60 ] ; then
RTYPE=tim
fi
RSTAT=0
RFILE=$DATAPATH/${TYPE}${NSETS}pctl${PCTL}_ref
OFILE=${TYPE}${NSETS}pctl${PCTL}_res
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
CDOTEST="${TYPE}pctl nsets=${NSETS}"
$CDO diff $OFILE $RFILE
test $? -eq 0 || let RSTAT+=1
CDOCOMMAND="$CDO $FORMAT ${TYPE}pctl,${PCTL},${NSETS} $IFILE $DATAPATH/${RTYPE}min_ref $DATAPATH/${RTYPE}max_ref $OFILE"
TESTCOMMAND="$CDO diff $OFILE $RFILE"
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
runTest "$NTEST" "$CDOTEST" "$CDOCOMMAND" "$TESTCOMMAND"
rm -f $OFILE
let NTEST+=1
rm -f $OFILE
let NTEST+=1
done
#
exit 0
#! @BASH@
#
. ./cdoTestFunctions.test
#
echo 1..10 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
......@@ -14,28 +17,19 @@ IFILE=$DATAPATH/vars_data.grb
NTEST=1
#
for STAT in $STATS; do
RSTAT=0
RFILE=$DATAPATH/${TYPE}${STAT}_ref
OFILE=${TYPE}${STAT}_res
CDOTEST="${TYPE}$STAT"
CDOCOMMAND="$CDO $FORMAT ${TYPE}${STAT} $IFILE $OFILE"
echo "Running test: $NTEST"
echo "$CDOCOMMAND"
RSTAT=0
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
RFILE=$DATAPATH/${TYPE}${STAT}_ref
OFILE=${TYPE}${STAT}_res
$CDO diff $OFILE $RFILE
test $? -eq 0 || let RSTAT+=1
CDOTEST="${TYPE}$STAT"
CDOCOMMAND="$CDO $FORMAT ${TYPE}${STAT} $IFILE $OFILE"
TESTCOMMAND="$CDO diff $OFILE $RFILE"
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
runTest "$NTEST" "$CDOTEST" "$CDOCOMMAND" "$TESTCOMMAND"
rm -f $OFILE
let NTEST+=1
rm -f $OFILE
let NTEST+=1
done
#
exit 0
#! @BASH@
#
. ./cdoTestFunctions.test
#
echo 1..12 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
......@@ -21,21 +24,11 @@ for STAT in $STATS; do
CDOTEST="${OPERTYPES}$STAT"
CDOCOMMAND="$CDO $FORMAT ${OPERTYPES}${STAT} $IFILE $OFILE"
TESTCOMMAND="$CDO diff $OFILE $RFILE"
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"
runTest "$NTEST" "$CDOTEST" "$CDOCOMMAND" "$TESTCOMMAND"
rm -f $OFILE
fi
let NTEST+=1
done
#
......
#! @BASH@
#
. ./cdoTestFunctions.test
#
echo 1..10 # 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"
#
OPERTYPES="zon"
......@@ -24,24 +25,13 @@ for TYPE in $OPERTYPES; do
CDOTEST="${TYPE}$STAT"
CDOCOMMAND="$CDO $FORMAT ${TYPE}${STAT} $IFILE $OFILE"
TESTCOMMAND="$CDO diff $OFILE $RFILE"
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"
runTest "$NTEST" "$CDOTEST" "$CDOCOMMAND" "$TESTCOMMAND"
rm -f $OFILE
fi
let NTEST+=1
done
done
#
#
exit 0
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