Commit 82417228 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

test/File.test.in: changed cdiread to copy

parent c1572e9d
......@@ -89,7 +89,6 @@ void *CDIread(void *argument)
int filetype = -1, datatype = -1;
int irun, nruns = 1;
char sinfo[64];
char *envstr;
off_t nvalues = 0;
double file_size = 0, data_size = 0;
double tw, tw0, t0, twsum = 0;
......@@ -100,7 +99,7 @@ void *CDIread(void *argument)
cdoInitialize(argument);
envstr = getenv("MEMTYPE");
char *envstr = getenv("MEMTYPE");
if ( envstr )
{
if ( strcmp(envstr, "float") == 0 ) memtype = MEMTYPE_FLOAT;
......@@ -116,11 +115,7 @@ void *CDIread(void *argument)
if ( nruns < 0 ) nruns = 0;
if ( nruns > 99 ) nruns = 99;
if ( cdoVerbose )
{
cdoPrint("nruns : %d", nruns);
}
if ( cdoVerbose ) cdoPrint("nruns : %d", nruns);
// vlistDefNtsteps(vlistID, 1);
......
......@@ -10,7 +10,7 @@ FORMATS="srv ext ieg grb grb2 nc nc2 nc4"
#
NTEST=1
#
for OPERATOR in write read; do
for OPERATOR in write copy; do
for FORMAT in $FORMATS; do
RSTAT=0
......@@ -65,20 +65,26 @@ for OPERATOR in write read; do
test $? -eq 0 || let RSTAT+=1
test -s $FILE || let RSTAT+=1
cat $CDOOUT $CDOERR
$CDO diff,0.0001 $FILE $RFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
else
CDOCOMMAND="$CDO cdi${OPERATOR} $FILE"
OFILE=file_${DATATYPE}_${FORMAT}_res
CDOCOMMAND="$CDO ${OPERATOR} $FILE $OFILE"
echo "$CDOCOMMAND"
$CDOCOMMAND > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
cat $CDOOUT $CDOERR
$CDO diff,0.0001 $FILE $RFILE > $CDOOUT 2> $CDOERR
$CDO diff,0.0001 $FILE $OFILE > $CDOOUT 2> $CDOERR
test $? -eq 0 || let RSTAT+=1
test -s $CDOOUT && let RSTAT+=1
cat $CDOOUT $CDOERR
rm -f $FILE
rm -f $FILE $OFILE
fi
done
......
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