summaryrefslogtreecommitdiffstats
path: root/windows/c++/examples/testcppExamples.BAT
blob: e44842b545a4983ac656ff788f4922acf820013e (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
@REM Copyright by the Board of Trustees of the University of Illinois.
@REM All rights reserved.
@REM
@REM This file is part of HDF5.  The full HDF5 copyright notice, including
@REM terms governing use, modification, and redistribution, is contained in
@REM the files COPYING and Copyright.html.  COPYING can be found at the root
@REM of the source code distribution tree; Copyright.html can be found at the
@REM root level of an installed copy of the electronic HDF5 document set and
@REM is linked from the top-level documents page.  It can also be found at
@REM http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html.  If you do not have
@REM access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu.

@ECHO OFF
REM This batch file is used to test HDF5 C++ examples.

REM By Xuan Bai

REM Created on: 10/20/2004

REM Last Modified: 10/20/2004


if %1.==. GOTO WRONG
if "%1"=="/?" GOTO HELP

if %1==release GOTO RELEASE

if %1==debug GOTO DEBUG

GOTO WRONG



:RELEASE

if %2.==. GOTO REL

if %2==dll GOTO RELDLL

GOTO WRONG



:REL

type nul > %1.txt

cd cppexamplesREL

createtest >> ..\%1.txt

readdatatest >> ..\%1.txt

writedatatest >> ..\%1.txt

compoundtest >> ..\%1.txt

extend_dstest >> ..\%1.txt

chunkstest >> ..\%1.txt

h5grouptest >> ..\%1.txt

cd ..

fc %1.txt expected.out >temp.txt

if %ERRORLEVEL%==0 (

   echo All HDF5 C++ examples tests passed.

) else (

   echo HDF5 C++ examples tests failed.

   more temp.txt

)

del temp.txt

GOTO END



:RELDLL

type nul > %1.txt

cd cppexamplesRELDLL

createtestdll >> ..\%1.txt

readdatatestdll >> ..\%1.txt

writedatatestdll >> ..\%1.txt

compoundtestdll >> ..\%1.txt

extend_dstestdll >> ..\%1.txt

chunkstestdll >> ..\%1.txt

h5grouptestdll >> ..\%1.txt

cd ..

fc %1.txt expected.out >temp.txt

if %ERRORLEVEL%==0 (

   echo All HDF5 C++ examples tests passed.

) else (

   echo HDF5 C++ examples tests failed.

   more temp.txt

)

del temp.txt

GOTO END



:DEBUG

if %2.==. GOTO DBG

if %2==dll GOTO DBGDLL

GOTO WRONG



:DBG

type nul > %1.txt

cd cppexamplesDBG

createtest >> ..\%1.txt

readdatatest >> ..\%1.txt

writedatatest >> ..\%1.txt

compoundtest >> ..\%1.txt

extend_dstest >> ..\%1.txt

chunkstest >> ..\%1.txt

h5grouptest >> ..\%1.txt

cd ..

fc %1.txt expected.out >temp.txt

if %ERRORLEVEL%==0 (

   echo All HDF5 C++ examples tests passed.

) else (

   echo HDF5 C++ examples tests failed.

   more temp.txt

)

del temp.txt

GOTO END



:DBGDLL

type nul > %1.txt

cd cppexamplesDBGDLL

createtestdll >> ..\%1.txt

readdatatestdll >> ..\%1.txt

writedatatestdll >> ..\%1.txt

compoundtestdll >> ..\%1.txt

extend_dstestdll >> ..\%1.txt

chunkstestdll >> ..\%1.txt

h5grouptestdll >> ..\%1.txt

cd ..

fc %1.txt expected.out >temp.txt

if %ERRORLEVEL%==0 (

   echo All HDF5 C++ examples tests passed.

) else (

   echo HDF5 C++ examples tests failed.

   more temp.txt

)

del temp.txt

GOTO END



:WRONG

echo The syntax of the command is incorrect.

echo.



:HELP

echo Tests HDF5 C++ examples.

echo.

echo testcppExamples [OPTION]

echo.

echo Please use one of the following options!

echo.

echo    testcppExamples release        test HDF5 C++ examples -- release version

echo    testcppExamples release dll    test HDF5 C++ examples -- release dll version

echo    testcppExamples debug          test HDF5 C++ examples -- debug version

echo    testcppExamples debug dll      test HDF5 C++ examples -- debug dll version

echo    testcppExamples /?             Help information

echo.



:END