mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-19 16:50:46 +08:00
[svn-r19282] Fix test scripts (Cmake needs to capture output yet)
linux script needed -R and double compare: Tested: local linux
This commit is contained in:
parent
0f95a9d5ab
commit
8c18457646
2
MANIFEST
2
MANIFEST
@ -1183,7 +1183,7 @@
|
||||
./tools/testfiles/tattrreg.ddl
|
||||
./tools/testfiles/tattrregR.ddl
|
||||
./tools/testfiles/tbinregR.exp
|
||||
./tools/testfiles/tbinregR.txt
|
||||
./tools/testfiles/tbinregR.ddl
|
||||
./tools/testfiles/tbitfields.h5
|
||||
./tools/testfiles/tchar.h5
|
||||
./tools/testfiles/tchar1.ddl
|
||||
|
@ -70,6 +70,7 @@ IF (BUILD_TESTING)
|
||||
tattr-3.ddl
|
||||
tattrreg.ddl
|
||||
tattrregR.ddl
|
||||
tbinregR.ddl
|
||||
tbigdims.ddl
|
||||
tboot1.ddl
|
||||
tboot2.ddl
|
||||
|
@ -144,11 +144,14 @@ TOOLTEST1() {
|
||||
|
||||
}
|
||||
|
||||
# same as TOOLTEST1 but compares generated file to Expected output
|
||||
# same as TOOLTEST1 but compares generated file to expected output
|
||||
# and compares the generated data file to the expected data file
|
||||
# used for the binary tests that expect a full path in -o without -b
|
||||
TOOLTEST2() {
|
||||
|
||||
expect="$srcdir/../testfiles/`basename $1 .exp`.txt"
|
||||
expectdata="$srcdir/../testfiles/$1"
|
||||
expect="$srcdir/../testfiles/`basename $1 .exp`.ddl"
|
||||
actualdata="../testfiles/`basename $1 .exp`.txt"
|
||||
actual="../testfiles/`basename $1 .exp`.out"
|
||||
actual_err="../testfiles/`basename $1 .exp`.err"
|
||||
shift
|
||||
@ -167,17 +170,28 @@ TOOLTEST2() {
|
||||
echo " CREATED"
|
||||
cp $actual $expect
|
||||
elif $CMP $expect $actual; then
|
||||
echo " PASSED"
|
||||
if [ ! -f $expectdata ]; then
|
||||
# Create the expect data file if it doesn't yet exist.
|
||||
echo " CREATED"
|
||||
cp $actualdata $expectdata
|
||||
elif $CMP $expectdata $actualdata; then
|
||||
echo " PASSED"
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected datafile (*.exp) differs from actual datafile (*.txt)"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expectdata $actualdata |sed 's/^/ /'
|
||||
fi
|
||||
else
|
||||
echo "*FAILED*"
|
||||
echo " Expected result (*.ddl) differs from actual result (*.txt)"
|
||||
echo " Expected result (*.ddl) differs from actual result (*.out)"
|
||||
nerrors="`expr $nerrors + 1`"
|
||||
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
|
||||
fi
|
||||
|
||||
|
||||
# Clean up output file
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
rm -f $actual $actual_err
|
||||
rm -f $actual $actualdata $actual_err
|
||||
fi
|
||||
|
||||
}
|
||||
@ -532,7 +546,7 @@ TOOLTEST tdataregR.ddl -R tdatareg.h5
|
||||
TOOLTEST tattrreg.ddl tattrreg.h5
|
||||
TOOLTEST tattrregR.ddl -R tattrreg.h5
|
||||
|
||||
TOOLTEST2 tbinregR.exp -d /Dataset1 -s 0 -y -o $TESTDIR/tbinregR.txt tdatareg.h5
|
||||
TOOLTEST2 tbinregR.exp -d /Dataset1 -s 0 -R -y -o $TESTDIR/tbinregR.txt tdatareg.h5
|
||||
|
||||
# Clean up text output files
|
||||
if test -z "$HDF5_NOCLEANUP"; then
|
||||
|
21
tools/testfiles/tbinregR.ddl
Normal file
21
tools/testfiles/tbinregR.ddl
Normal file
@ -0,0 +1,21 @@
|
||||
HDF5 "testfiles/tdatareg.h5" {
|
||||
DATASET "/Dataset1" {
|
||||
DATATYPE H5T_REFERENCE { H5T_STD_REF_DSETREG }
|
||||
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
|
||||
SUBSET {
|
||||
START ( 0 );
|
||||
STRIDE ( 1 );
|
||||
COUNT ( 1 );
|
||||
BLOCK ( 1 );
|
||||
DATA {
|
||||
DATASET /Dataset2 {
|
||||
REGION_TYPE BLOCK (2,2)-(7,7)
|
||||
DATATYPE H5T_STD_U8BE
|
||||
DATASPACE SIMPLE { ( 10, 10 ) / ( 10, 10 ) }
|
||||
DATA {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
HDF5 "tdatareg.h5" {
|
||||
DATASET "/Dataset1" {
|
||||
DATATYPE H5T_REFERENCE
|
||||
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
|
||||
SUBSET {
|
||||
START ( 0 );
|
||||
STRIDE ( 1 );
|
||||
COUNT ( 1 );
|
||||
BLOCK ( 1 );
|
||||
DATA {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user