Commit eb8f3173 authored by Uwe Schulzweida's avatar Uwe Schulzweida

test cleanup.

parent 15c29f17
Pipeline #5693 passed with stages
in 14 minutes and 53 seconds
#! @BASH@
#
echo 1..4 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
......
#! @BASH@
#
echo 1..9 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
......
#! @BASH@
#
echo 1..6 # Number of tests to be executed.
#
. ./cdoTestFunctions.test
#
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"
STATS="eq ne le lt ge gt"
OPERATORS="eq ne le lt ge gt"
CONST=300
#
IFILE=$DATAPATH/comptest.srv
......@@ -13,27 +16,16 @@ NTEST=1
CFILE=constdata
$CDO $FORMAT const,${CONST},${IFILE} $CFILE
#
for STAT in $STATS; do
for OPERATOR in $OPERATORS; do
if [ -z "$1" ] || [ $NTEST == $1 ]; then
RSTAT=0
RFILE=$DATAPATH/comp_${STAT}c_ref
OFILE=comp_${STAT}_res
CDOTEST="$STAT"
CDOCOMMAND="$CDO $FORMAT ${STAT} $IFILE $CFILE $OFILE"
echo "Running test: $NTEST - $CDOTEST"
echo "$CDOCOMMAND"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
RFILE=$DATAPATH/comp_${OPERATOR}c_ref
OFILE=comp_${OPERATOR}_res
$CDO diff $OFILE $RFILE
test $? -eq 0 || let RSTAT+=1
CDOTEST="$OPERATOR"
CDOCOMMAND="$CDO $FORMAT ${OPERATOR} $IFILE $CFILE $OFILE"
TESTCOMMAND="$CDO diff $OFILE $RFILE"
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
test $RSTAT -eq 0 || echo "not ok $NTEST - $CDOTEST"
runTest
rm -f $OFILE
fi
let NTEST+=1
......
#! @BASH@
#
echo 1..6 # Number of tests to be executed.
#
. ./cdoTestFunctions.test
#
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"
STATS="eqc nec lec ltc gec gtc"
OPERATORS="eqc nec lec ltc gec gtc"
CONST=300
#
IFILE=$DATAPATH/comptest.srv
NTEST=1
#
for STAT in $STATS; do
for OPERATOR in $OPERATORS; do
if [ -z "$1" ] || [ $NTEST == $1 ]; then
RSTAT=0
RFILE=$DATAPATH/comp_${STAT}_ref
OFILE=comp_${STAT}_res
CDOTEST="$STAT"
CDOCOMMAND="$CDO $FORMAT ${STAT},${CONST} $IFILE $OFILE"
echo "Running test: $NTEST - $CDOTEST"
echo "$CDOCOMMAND"
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
RFILE=$DATAPATH/comp_${OPERATOR}_ref
OFILE=comp_${OPERATOR}_res
$CDO diff $OFILE $RFILE
test $? -eq 0 || let RSTAT+=1
CDOTEST="$OPERATOR"
CDOCOMMAND="$CDO $FORMAT ${OPERATOR},${CONST} $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
rm -f $OFILE
fi
let NTEST+=1
......
#! @BASH@
#
echo 1..5 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
......
#! @BASH@
#
echo 1..2 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
......
......@@ -10,9 +10,9 @@ test -n "$DATAPATH" || DATAPATH="@abs_top_srcdir@/test/data/"
OPERATORS="fldcor fldcovar"
#
IFILE=$DATAPATH/t21_geosp_tsurf.grb
IFILE1=var1
IFILE1=var1_$$
$CDO selcode,129 $IFILE $IFILE1
IFILE2=var2
IFILE2=var2_$$
$CDO selcode,169 $IFILE $IFILE2
#
FORMAT="-f srv -b 32"
......@@ -33,6 +33,6 @@ for OPERATOR in $OPERATORS; do
let NTEST+=1
done
#
rm -f
rm -f $IFILE1 $IFILE2
#
exit 0
#! @BASH@
#
echo 1..3 # Number of tests to be executed.
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
......@@ -10,7 +11,6 @@ ABSLIMMAX=0.001
IFILE=$DATAPATH/t21_geosp_tsurf_sea.grb
NTEST=1
#
#
function testfunc()
{
if [ -z "$1" ] || [ $NTEST == $1 ]; then
......@@ -32,8 +32,6 @@ function testfunc()
$CDO diff,abslim=$ABSLIMMAX $RFILE $OFILE
test $? -eq 0 || let RSTAT+=1
rm -f $OFILE $FINSTR
test $RSTAT -eq 0 && echo "ok $NTEST - $CDOTEST"
......@@ -42,14 +40,13 @@ function testfunc()
let NTEST+=1
}
#
STATS="smooth"
SMOOTHOPT="$STATS,radius=5deg"
SMOOTHOPT="smooth,radius=5deg"
testfunc
#
SMOOTHOPT="$STATS,radius=5deg,maxpoints=3"
SMOOTHOPT="smooth,radius=5deg,maxpoints=3"
testfunc
#
SMOOTHOPT="$STATS,radius=5deg,nsmooth=9"
SMOOTHOPT="smooth,radius=5deg,nsmooth=9"
testfunc
#
exit 0
......@@ -11,21 +11,20 @@ IFILE1=$DATAPATH/ts_mm_5years
IFILE2=$DATAPATH/ts_ym_5years
#
FORMAT="-f srv -b 32"
STATS="yearadd yearsub yearmul yeardiv"
OPERATORS="yearadd yearsub yearmul yeardiv"
#
NTEST=1
#
for STAT in $STATS; do
for OPERATOR in $OPERATORS; do
if [ -z "$1" ] || [ $NTEST == $1 ]; then
RFILE=$DATAPATH/${STAT}_ref
RFILE=$DATAPATH/${OPERATOR}_ref
OFILE=${OPERATOR}_res
OFILE=${STAT}_res
CDOTEST="$STAT"
CDOCOMMAND="$CDO $FORMAT ${STAT} $IFILE1 $IFILE2 $OFILE"
CDOTEST="$OPERATOR"
CDOCOMMAND="$CDO $FORMAT ${OPERATOR} $IFILE1 $IFILE2 $OFILE"
TESTCOMMAND="$CDO diff $OFILE $RFILE"
runTest
rm -f $OFILE
let NTEST+=1
fi
......
#! @BASH@
#
echo 1..4 # Number of tests to be executed.
#
. ./cdoTestFunctions.test
#
test -n "$CDO" || CDO="@abs_top_builddir@/src/cdo $CDO_DEBUG"
test -n "$DATAPATH" || DATAPATH="@abs_top_srcdir@/test/data/"
#
......@@ -8,34 +11,21 @@ IFILE1=$DATAPATH/ts_mm_5years
IFILE2=$DATAPATH/ts_mm_1year
#
FORMAT="-f srv -b 32"
STATS="ymonadd ymonsub ymonmul ymondiv"
OPERATORS="ymonadd ymonsub ymonmul ymondiv"
#
NTEST=1
#
for STAT in $STATS; do
for OPERATOR in $OPERATORS; do
if [ -z "$1" ] || [ $NTEST == $1 ]; then
RSTAT=0
RFILE=$DATAPATH/${STAT}_ref
CDOTEST="$STAT"
echo "Running test: $NTEST - $CDOTEST"
RFILE=$DATAPATH/${OPERATOR}_ref
OFILE=${OPERATOR}_res
OFILE=${STAT}_res
CDOCOMMAND="$CDO $FORMAT ${STAT} $IFILE1 $IFILE2 $OFILE"
echo $CDOCOMMAND
$CDOCOMMAND
test $? -eq 0 || let RSTAT+=1
$CDO diff $OFILE $RFILE
test $? -eq 0 || let RSTAT+=1
CDOTEST="$OPERATOR"
CDOCOMMAND="$CDO $FORMAT ${OPERATOR} $IFILE1 $IFILE2 $OFILE"
TESTCOMMAND="$CDO diff $OFILE $RFILE"
runTest
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
......
......@@ -33,7 +33,7 @@ MONMSTAT = monmmin_ref monmmax_ref monmsum_ref monmavg_ref monmmean_ref monm
DAYMSTAT = daymmin_ref daymmax_ref daymsum_ref daymavg_ref daymmean_ref daymstd_ref daymstd1_ref daymvar_ref daymvar1_ref daymrange_ref
VERTSTAT = vertmin_ref vertmax_ref vertsum_ref vertavg_ref vertmean_ref vertstd_ref vertstd1_ref vertvar_ref vertvar1_ref vertint_ref vertrange_ref vertcum_ref
VARSSTAT = varsmin_ref varsmax_ref varssum_ref varsavg_ref varsmean_ref varsstd_ref varsstd1_ref varsvar_ref varsvar1_ref varsrange_ref
FLDSTAT2 = fldcor_ref fldovar_ref
FLDSTAT2 = fldcor_ref fldcovar_ref
FLDSTAT = fldmin_ref fldmax_ref fldsum_ref fldavg_ref fldmean_ref fldstd_ref fldstd1_ref fldvar_ref fldvar1_ref fldrange_ref fldkurt_ref fldskew_ref
FLDPSTAT = fldpctl1_ref fldpctl20_ref fldpctl25_ref fldpctl33_ref fldpctl50_ref fldpctl66_ref fldpctl75_ref fldpctl80_ref fldpctl99_ref fldpctl100_ref
MERSTAT = mermin_ref mermax_ref mersum_ref meravg_ref mermean_ref merstd_ref merstd1_ref mervar_ref mervar1_ref merrange_ref
......@@ -99,7 +99,7 @@ FILTER = lowpass_ref highpass_ref bandpass_ref
ISOSURFACE = isosurface_ref bottomvalue_ref topvalue_ref
EXTRA_DIST = $(INPUTDATA) $(FILE) $(GRIB) $(NETCDF) $(EOF) $(COMP) $(YDRUNSTAT) $(YDAYSTAT) $(YMONSTAT) $(YMONMSTAT) $(YSEASSTAT) $(SEASSTAT) $(SEASMSTAT) $(TIMPCTL) $(TIMSELPCTL) \
$(RUNSTAT) $(RUNMSTAT) $(RUNPCTL) $(TIMSTAT2) $(YEARMONSTAT) $(VERTSTAT) $(VARSSTAT) $(FLDSTAT) $(FLDPSTAT) \
$(RUNSTAT) $(RUNMSTAT) $(RUNPCTL) $(TIMSTAT2) $(YEARMONSTAT) $(VERTSTAT) $(VARSSTAT) $(FLDSTAT2) $(FLDSTAT) $(FLDPSTAT) \
$(ISOSURFACE) \
$(TIMSTAT) $(YEARSTAT) $(MONSTAT) $(DAYSTAT) $(TIMMSTAT) $(YEARMSTAT) $(MONMSTAT) $(DAYMSTAT) \
$(MERSTAT) $(ZONSTAT) $(ENSSTAT) $(ENSMSTAT) $(ENSPCTL) $(SPECTRAL) $(WIND) $(INTTIME) $(VERTINT) $(REMAPGRID) $(REMAPSTAT) $(REMAP) $(REMAP2) $(REMAP3) $(SELECT) $(DETREND) \
......
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