blob: 759a6605ebcf18db4cd21a94ac4cace08b3d4d2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
#!/bin/sh
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the files COPYING and Copyright.html. COPYING can be found at the root
# of the source code distribution tree; Copyright.html can be found at the
# root level of an installed copy of the electronic HDF5 document set and
# is linked from the top-level documents page. It can also be found at
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
# access to either file, you may request a copy from help@hdfgroup.org.
#
# HDF Utilities Test script
# Usage: h5importtestutil.sh [machine-type]
# initialize errors variable
errors=0
TESTING() {
SPACES=" "
echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
}
TOOLTEST()
{
err=0
$RUNSERIAL ./h5import $*
$RUNSERIAL ../h5dump/h5dump $5 >log2
cd tmp_testfiles
$RUNSERIAL ../../h5dump/h5dump $5 >log1
cd ..
cmp -s tmp_testfiles/log1 log2 || err=1
rm -f log2 tmp_testfiles/log1
if [ $err -eq 1 ]; then
errors="` expr $errors + 1 `";
echo "*FAILED*"
else
echo " PASSED"
fi
}
echo ""
echo "=============================="
echo "H5IMPORT tests started"
echo "=============================="
if [ -f h5import -a -f h5importtest ]; then
#echo "** Testing h5import ***"
rm -f output.h5 log1 tx* b* *.dat
mkdir tmp_testfiles
cp $srcdir/testfiles/*.h5 tmp_testfiles/
$RUNSERIAL ./h5importtest
TESTING "ASCII I32 rank 3 - Output BE " ;
TOOLTEST $srcdir/testfiles/in32.txt -c $srcdir/testfiles/textin32.conf -o test1.h5
TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended"
TOOLTEST $srcdir/testfiles/in16.txt -c $srcdir/testfiles/textin16.conf -o test2.h5
TESTING "ASCII I8 - rank 3 - Output I16 LE-Chunked+Extended+Compressed "
TOOLTEST $srcdir/testfiles/in16.txt -c $srcdir/testfiles/textin8.conf -o test3.h5
TESTING "ASCII UI32 - rank 3 - Output BE"
TOOLTEST $srcdir/testfiles/in1.txt -c $srcdir/testfiles/textuin32.conf -o test4.h5
TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed "
TOOLTEST $srcdir/testfiles/in1.txt -c $srcdir/testfiles/textuin16.conf -o test5.h5
TESTING "ASCII F32 - rank 3 - Output LE "
TOOLTEST $srcdir/testfiles/fp1.txt -c $srcdir/testfiles/textfp32.conf -o test6.h5
TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed "
TOOLTEST $srcdir/testfiles/fp2.txt -c $srcdir/testfiles/textfp64.conf -o test7.h5
TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed "
TOOLTEST bfp64 -c $srcdir/testfiles/binfp64.conf -o test8.h5
TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended "
TOOLTEST bin16 -c $srcdir/testfiles/binin16.conf -o test9.h5
TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed "
TOOLTEST bin8 -c $srcdir/testfiles/binin8.conf -o test10.h5
TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED "
TOOLTEST bin32 -c $srcdir/testfiles/binin32.conf -o test11.h5
TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED "
TOOLTEST buin16 -c $srcdir/testfiles/binuin16.conf -o test12.h5
TESTING "BINARY UI32 - rank 3 - Output LE + CHUNKED "
TOOLTEST buin32 -c $srcdir/testfiles/binuin32.conf -o test13.h5
TESTING "STR"
TOOLTEST $srcdir/testfiles/str.txt -c $srcdir/testfiles/textstr.conf -o test14.h5
TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE "
TOOLTEST $srcdir/testfiles/in64.txt -c $srcdir/testfiles/textpfe.conf -o test15.h5
rm -f tx* b* *.dat *.txt
rm -f test*.h5
rm -rf tmp_testfiles
else
echo "** h5import or h5importtest not available ***"
errors="` expr $errors + 1 `";
fi
#
# Check errors result
if [ $errors -eq 0 ]; then
echo "======================================"
echo " H5IMPORT Utilities tests have passed."
echo "======================================"
else
echo "*********************************************"
echo " H5IMPORT Utilities tests encountered errors"
echo "*********************************************"
fi
exit $errors
|