blob: 822cfc092eddc66f4fb0f62b9680422dd33d27f7 (
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
|
@ ECHO OFF
mkdir temptest
cd h5ls%2\%1
h5ls%2 -w80 -h > ..\..\temptest\help-1.results 2>..\..\temptest\help-1_error.results
more ..\..\temptest\help-1_error.results >> ..\..\temptest\help-1.results
del ..\..\temptest\help-1_error.results
h5ls%2 -w80 -help > ..\..\temptest\help-2.results 2>..\..\temptest\help-2_error.results
more ..\..\temptest\help-2_error.results >> ..\..\temptest\help-2.results
del ..\..\temptest\help-2_error.results
h5ls%2 -w80 -? > ..\..\temptest\help-3.results 2>..\..\temptest\help-3_error.results
more ..\..\temptest\help-3_error.results >> ..\..\temptest\help-3.results
del ..\..\temptest\help-3_error.results
h5ls%2 -w80 ..\..\testfiles\tall.h5 > ..\..\temptest\tall-1.results 2>..\..\temptest\tall-1_error.results
more ..\..\temptest\tall-1_error.results >> ..\..\temptest\tall-1.results
del ..\..\temptest\tall-1_error.results
h5ls%2 -w80 -r -d ..\..\testfiles\tall.h5 > ..\..\temptest\tall-2.results 2>..\..\temptest\tall-2_error.results
more ..\..\temptest\tall-2_error.results >> ..\..\temptest\tall-2.results
del ..\..\temptest\tall-2_error.results
h5ls%2 -w80 ..\..\testfiles\tgroup.h5 > ..\..\temptest\tgroup.results 2>..\..\temptest\tgroup_error.results
more ..\..\temptest\tgroup_error.results >> ..\..\temptest\tgroup.results
del ..\..\temptest\tgroup_error.results
h5ls%2 -w80 -r -g ..\..\testfiles\tgroup.h5 > ..\..\temptest\tgroup-1.results 2>..\..\temptest\tgroup-1_error.results
more ..\..\temptest\tgroup-1_error.results >> ..\..\temptest\tgroup-1.results
del ..\..\temptest\tgroup-1_error.results
h5ls%2 -w80 -r -d ..\..\testfiles\tdset.h5 > ..\..\temptest\tdset-1.results 2>..\..\temptest\tdset-1_error.results
more ..\..\temptest\tdset-1_error.results >> ..\..\temptest\tdset-1.results
del ..\..\temptest\tdset-1_error.results
h5ls%2 -w80 -r ..\..\testfiles\tslink.h5 > ..\..\temptest\tslink-1.results 2>..\..\temptest\tslink-1_error.results
more ..\..\temptest\tslink-1_error.results >> ..\..\temptest\tslink-1.results
del ..\..\temptest\tslink-1_error.results
h5ls%2 -w80 ..\..\testfiles\thlink.h5 > ..\..\temptest\thlink-1.results 2>..\..\temptest\thlink-1_error.results
more ..\..\temptest\thlink-1_error.results >> ..\..\temptest\thlink-1.results
del ..\..\temptest\thlink-1_error.results
h5ls%2 -w80 -r -d ..\..\testfiles\tcompound.h5 > ..\..\temptest\tcomp-1.results 2>..\..\temptest\tcomp-1_error.results
more ..\..\temptest\tcomp-1_error.results >> ..\..\temptest\tcomp-1.results
del ..\..\temptest\tcomp-1_error.results
h5ls%2 -w80 -r -d ..\..\testfiles\tnestedcomp.h5 > ..\..\temptest\tnestcomp-1.results 2>..\..\temptest\tnestcomp-1_error.results
more ..\..\temptest\tnestcomp-1_error.results >> ..\..\temptest\tnestcomp-1.results
del ..\..\temptest\tnestcomp-1_error.results
h5ls%2 -w80 -r -d ..\..\testfiles\tloop.h5 > ..\..\temptest\tloop-1.results 2>..\..\temptest\tloop-1_error.results
more ..\..\temptest\tloop-1_error.results >> ..\..\temptest\tloop-1.results
del ..\..\temptest\tloop-1_error.results
h5ls%2 -w80 -r -d ..\..\testfiles\tstr.h5 > ..\..\temptest\tstr-1.results 2>..\..\temptest\tstr-1_error.results
more ..\..\temptest\tstr-1_error.results >> ..\..\temptest\tstr-1.results
del ..\..\temptest\tstr-1_error.results
h5ls%2 -w80 -r -d ..\..\testfiles\tsaf.h5 > ..\..\temptest\tsaf.results 2>..\..\temptest\tsaf_error.results
more ..\..\temptest\tsaf_error.results >> ..\..\temptest\tsaf.results
del ..\..\temptest\tsaf_error.results
h5ls%2 -w80 -r -d ..\..\testfiles\tvldtypes1.h5 > ..\..\temptest\tvldtypes1.results 2>..\..\temptest\tvldtypes1_error.results
more ..\..\temptest\tvldtypes1_error.results >> ..\..\temptest\tvldtypes1.results
del ..\..\temptest\tvldtypes1_error.results
h5ls%2 -w80 -r -d ..\..\testfiles\tarray1.h5 > ..\..\temptest\tarray1.results 2>..\..\temptest\tarray1_error.results
more ..\..\temptest\tarray1_error.results >> ..\..\temptest\tarray1.results
del ..\..\temptest\tarray1_error.results
h5ls%2 -w80 -d ..\..\testfiles\tempty.h5 > ..\..\temptest\tempty.results 2>..\..\temptest\tempty_error.results
more ..\..\temptest\tempty_error.results >> ..\..\temptest\tempty.results
del ..\..\temptest\tempty_error.results
h5ls%2 -w80 -v -S ..\..\testfiles\tattr2.h5 > ..\..\temptest\tattr2.results 2>..\..\temptest\tattr2_error.results
more ..\..\temptest\tattr2_error.results >> ..\..\temptest\tattr2.results
del ..\..\temptest\tattr2_error.results
cd ..\..\temptest
mkdir fctemp
REM ##############################################################################
REM ##############################################################################
REM ### T H E T E S T S ###
REM ##############################################################################
REM ##############################################################################
type nul > ..\lstest%2_%1.txt
echo ========================================== >> ..\lstest%2_%1.txt
echo Testing lstest.bat >> ..\lstest%2_%1.txt
echo ========================================== >> ..\lstest%2_%1.txt
REM Toss in a bunch of tests. Not sure if they are the right kinds.
REM test the help syntax
call ..\deleteline help-1.results 1
cd ..\testfiles
call ..\deleteline help-1.ls 4
cd ..\temptest\fctemp
fc help-1.ls help-1.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -h PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -h FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
call ..\deleteline help-2.results 1
cd ..\testfiles
call ..\deleteline help-2.ls 4
cd ..\temptest\fctemp
fc help-2.ls help-2.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -help PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -help FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
call ..\deleteline help-3.results 1
cd ..\testfiles
call ..\deleteline help-3.ls 4
cd ..\temptest\fctemp
fc help-3.ls help-3.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -? PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -? FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
REM test simple command
call ..\deleteline tall-1.results 1
cd ..\testfiles
call ..\deleteline tall-1.ls 4
cd ..\temptest\fctemp
fc tall-1.ls tall-1.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 tall.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 tall.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
call ..\deleteline tall-2.results 1
cd ..\testfiles
call ..\deleteline tall-2.ls 4
cd ..\temptest\fctemp
fc tall-2.ls tall-2.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -r -d tall.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -r -d tall.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
call ..\deleteline tgroup.results 1
cd ..\testfiles
call ..\deleteline tgroup.ls 4
cd ..\temptest\fctemp
fc tgroup.ls tgroup.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 tgroup.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 tgroup.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
REM test for displaying groups
call ..\deleteline tgroup-1.results 1
cd ..\testfiles
call ..\deleteline tgroup-1.ls 4
cd ..\temptest\fctemp
fc tgroup-1.ls tgroup-1.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -r -g tgroup.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -r -g tgroup.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
REM test for displaying simple space datasets
call ..\deleteline tdset-1.results 1
cd ..\testfiles
call ..\deleteline tdset-1.ls 4
cd ..\temptest\fctemp
fc tdset-1.ls tdset-1.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -r -d tdset.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -r -d tdset.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
REM test for displaying soft links
call ..\deleteline tslink-1.results 1
cd ..\testfiles
call ..\deleteline tslink-1.ls 4
cd ..\temptest\fctemp
fc tslink-1.ls tslink-1.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -r tslink.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -r tslink.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
REM tests for hard links
call ..\deleteline thlink-1.results 1
cd ..\testfiles
call ..\deleteline thlink-1.ls 4
cd ..\temptest\fctemp
fc thlink-1.ls thlink-1.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -w80 thlink.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -w80 thlink.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
REM tests for compound data types
call ..\deleteline tcomp-1.results 1
cd ..\testfiles
call ..\deleteline tcomp-1.ls 4
cd ..\temptest\fctemp
fc tcomp-1.ls tcomp-1.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -r -d tcompound.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -r -d tcompound.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
REM test for the nested compound type
call ..\deleteline tnestcomp-1.results 1
cd ..\testfiles
call ..\deleteline tnestcomp-1.ls 4
cd ..\temptest\fctemp
fc tnestcomp-1.ls tnestcomp-1.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -r -d tnestedcomp.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -r -d tnestedcomp.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
REM test for loop detection
call ..\deleteline tloop-1.results 1
cd ..\testfiles
call ..\deleteline tloop-1.ls 4
cd ..\temptest\fctemp
fc tloop-1.ls tloop-1.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -r -d tloop.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -r -d tloop.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
REM test for string
call ..\deleteline tstr-1.results 1
cd ..\testfiles
call ..\deleteline tstr-1.ls 4
cd ..\temptest\fctemp
fc tstr-1.ls tstr-1.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -r -d tstr.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -r -d tstr.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
REM test test file created from lib SAF team
call ..\deleteline tsaf.results 1
cd ..\testfiles
call ..\deleteline tsaf.ls 4
cd ..\temptest\fctemp
fc tsaf.ls tsaf.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -r -d tsaf.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -r -d tsaf.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
REM test for variable length data types
call ..\deleteline tvldtypes1.results 1
cd ..\testfiles
call ..\deleteline tvldtypes1.ls 4
cd ..\temptest\fctemp
fc tvldtypes1.ls tvldtypes1.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -r -d tvldtypes1.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -r -d tvldtypes1.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
REM test for array data types
call ..\deleteline tarray1.results 1
cd ..\testfiles
call ..\deleteline tarray1.ls 4
cd ..\temptest\fctemp
fc tarray1.ls tarray1.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -r -d tarray1.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -r -d tarray1.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
REM test for empty data
call ..\deleteline tempty.results 1
cd ..\testfiles
call ..\deleteline tempty.ls 4
cd ..\temptest\fctemp
fc tempty.ls tempty.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -d tempty.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -d tempty.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
REM test for all dataset types written to attributes
REM enable -S for avoiding printing NATIVE types
call ..\mask tattr2.results tattr2_temp.results
del tattr2.results
rename tattr2_temp.results tattr2.results
call ..\deleteline tattr2.results 1
cd ..\testfiles
call ..\mask tattr2.ls tattr2_temp.ls
del tattr2.ls
rename tattr2_temp.ls tattr2.ls
call ..\deleteline tattr2.ls 4
cd ..\temptest\fctemp
fc tattr2.ls tattr2.results >temp.txt
if %ERRORLEVEL%==0 (
echo Testing h5ls -w80 -v -S tattr2.h5 PASSED >> ..\..\lstest%2_%1.txt
) else (
echo Testing h5ls -w80 -v -S tattr2.h5 FAILED >> ..\..\lstest%2_%1.txt
more temp.txt >> ..\..\lstest%2_%1.txt
)
del temp.txt
cd ..
cd ..
rmdir /s/q temptest
|