INSTALL.txt review.
[Faustine.git] / interpreter / lib / src / libsndfile-1.0.25 / tests / test_wrapper.sh.in
1 #!/bin/sh
2
3 # Copyright (C) 2008-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
4 #
5 # All rights reserved.
6 #
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions are
9 # met:
10 #
11 # * Redistributions of source code must retain the above copyright
12 # notice, this list of conditions and the following disclaimer.
13 # * Redistributions in binary form must reproduce the above copyright
14 # notice, this list of conditions and the following disclaimer in
15 # the documentation and/or other materials provided with the
16 # distribution.
17 # * Neither the author nor the names of any contributors may be used
18 # to endorse or promote products derived from this software without
19 # specific prior written permission.
20 #
21 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
23 # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
25 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
28 # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
30 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
33
34 HOST_TRIPLET=@HOST_TRIPLET@
35 PACKAGE_VERSION=@PACKAGE_VERSION@
36 LIB_VERSION=`echo $PACKAGE_VERSION | sed "s/[a-z].*//"`
37
38 if test -f tests/sfversion@EXEEXT@ ; then
39 cd tests
40 fi
41
42 if test ! -f sfversion@EXEEXT@ ; then
43 echo "Not able to find test executables."
44 exit 1
45 fi
46
47 if test -f libsndfile.so.$LIB_VERSION ; then
48 # This will work on Linux, but not on Mac.
49 # Windows is already sorted out.
50 export LD_LIBRARY_PATH=`pwd`
51 if test ! -f libsndfile.so.1 ; then
52 ln -s libsndfile.so.$LIB_VERSION libsndfile.so.1
53 fi
54 fi
55
56 sfversion=`./sfversion@EXEEXT@ | sed "s/-exp$//"`
57
58 if test $sfversion != libsndfile-$PACKAGE_VERSION ; then
59 echo "Error : sfversion ($sfversion) and PACKAGE_VERSION ($PACKAGE_VERSION) don't match."
60 exit 1
61 fi
62
63 # Force exit on errors.
64 set -e
65
66 # Generic-tests
67 uname -a
68
69 # Check the header file.
70 sh pedantic-header-test.sh
71
72 # Need this for when we're running from files collected into the
73 # libsndfile-testsuite-@PACKAGE_VERSION@ tarball.
74 if test -x test_main@EXEEXT@ ; then
75 echo "Running unit tests from src/ directory of source code tree."
76 ./test_main@EXEEXT@
77 echo
78 echo "Running end-to-end tests from tests/ directory."
79 fi
80
81 ./error_test@EXEEXT@
82 ./pcm_test@EXEEXT@
83 ./ulaw_test@EXEEXT@
84 ./alaw_test@EXEEXT@
85 ./dwvw_test@EXEEXT@
86 ./command_test@EXEEXT@ ver
87 ./command_test@EXEEXT@ norm
88 ./command_test@EXEEXT@ format
89 ./command_test@EXEEXT@ peak
90 ./command_test@EXEEXT@ trunc
91 ./command_test@EXEEXT@ inst
92 ./command_test@EXEEXT@ current_sf_info
93 ./command_test@EXEEXT@ bext
94 ./command_test@EXEEXT@ bextch
95 ./command_test@EXEEXT@ chanmap
96 ./floating_point_test@EXEEXT@
97 ./checksum_test@EXEEXT@
98 ./scale_clip_test@EXEEXT@
99 ./headerless_test@EXEEXT@
100 ./rdwr_test@EXEEXT@
101 ./locale_test@EXEEXT@
102 ./win32_ordinal_test@EXEEXT@
103 ./external_libs_test@EXEEXT@
104 ./format_check_test@EXEEXT@
105
106 # The w64 G++ compiler requires an extra runtime DLL which we don't have,
107 # so skip this test.
108 case "$HOST_TRIPLET" in
109 x86_64-w64-mingw32)
110 ;;
111 i686-w64-mingw32)
112 ;;
113 *)
114 ./cpp_test@EXEEXT@
115 ;;
116 esac
117
118 echo "----------------------------------------------------------------------"
119 echo " $sfversion passed common tests."
120 echo "----------------------------------------------------------------------"
121
122 # aiff-tests
123 ./write_read_test@EXEEXT@ aiff
124 ./lossy_comp_test@EXEEXT@ aiff_ulaw
125 ./lossy_comp_test@EXEEXT@ aiff_alaw
126 ./lossy_comp_test@EXEEXT@ aiff_gsm610
127 echo "=========================="
128 echo "./lossy_comp_test@EXEEXT@ aiff_ima"
129 echo "=========================="
130 ./peak_chunk_test@EXEEXT@ aiff
131 ./header_test@EXEEXT@ aiff
132 ./misc_test@EXEEXT@ aiff
133 ./string_test@EXEEXT@ aiff
134 ./multi_file_test@EXEEXT@ aiff
135 ./aiff_rw_test@EXEEXT@
136 echo "----------------------------------------------------------------------"
137 echo " $sfversion passed tests on AIFF files."
138 echo "----------------------------------------------------------------------"
139
140 # au-tests
141 ./write_read_test@EXEEXT@ au
142 ./lossy_comp_test@EXEEXT@ au_ulaw
143 ./lossy_comp_test@EXEEXT@ au_alaw
144 ./lossy_comp_test@EXEEXT@ au_g721
145 ./lossy_comp_test@EXEEXT@ au_g723
146 ./header_test@EXEEXT@ au
147 ./misc_test@EXEEXT@ au
148 ./multi_file_test@EXEEXT@ au
149 echo "----------------------------------------------------------------------"
150 echo " $sfversion passed tests on AU files."
151 echo "----------------------------------------------------------------------"
152
153 # caf-tests
154 ./write_read_test@EXEEXT@ caf
155 ./lossy_comp_test@EXEEXT@ caf_ulaw
156 ./lossy_comp_test@EXEEXT@ caf_alaw
157 ./header_test@EXEEXT@ caf
158 ./peak_chunk_test@EXEEXT@ caf
159 ./misc_test@EXEEXT@ caf
160 echo "----------------------------------------------------------------------"
161 echo " $sfversion passed tests on CAF files."
162 echo "----------------------------------------------------------------------"
163
164 # wav-tests
165 ./write_read_test@EXEEXT@ wav
166 ./lossy_comp_test@EXEEXT@ wav_pcm
167 ./lossy_comp_test@EXEEXT@ wav_ima
168 ./lossy_comp_test@EXEEXT@ wav_msadpcm
169 ./lossy_comp_test@EXEEXT@ wav_ulaw
170 ./lossy_comp_test@EXEEXT@ wav_alaw
171 ./lossy_comp_test@EXEEXT@ wav_gsm610
172 ./lossy_comp_test@EXEEXT@ wav_g721
173 ./peak_chunk_test@EXEEXT@ wav
174 ./header_test@EXEEXT@ wav
175 ./misc_test@EXEEXT@ wav
176 ./string_test@EXEEXT@ wav
177 ./multi_file_test@EXEEXT@ wav
178 echo "----------------------------------------------------------------------"
179 echo " $sfversion passed tests on WAV files."
180 echo "----------------------------------------------------------------------"
181
182 # w64-tests
183 ./write_read_test@EXEEXT@ w64
184 ./lossy_comp_test@EXEEXT@ w64_ima
185 ./lossy_comp_test@EXEEXT@ w64_msadpcm
186 ./lossy_comp_test@EXEEXT@ w64_ulaw
187 ./lossy_comp_test@EXEEXT@ w64_alaw
188 ./lossy_comp_test@EXEEXT@ w64_gsm610
189 ./header_test@EXEEXT@ w64
190 ./misc_test@EXEEXT@ w64
191 echo "----------------------------------------------------------------------"
192 echo " $sfversion passed tests on W64 files."
193 echo "----------------------------------------------------------------------"
194
195 # rf64-tests
196 ./write_read_test@EXEEXT@ rf64
197 ./header_test@EXEEXT@ rf64
198 ./misc_test@EXEEXT@ rf64
199 echo "----------------------------------------------------------------------"
200 echo " $sfversion passed tests on RF64 files."
201 echo "----------------------------------------------------------------------"
202
203 # raw-tests
204 ./write_read_test@EXEEXT@ raw
205 ./lossy_comp_test@EXEEXT@ raw_ulaw
206 ./lossy_comp_test@EXEEXT@ raw_alaw
207 ./lossy_comp_test@EXEEXT@ raw_gsm610
208 ./lossy_comp_test@EXEEXT@ vox_adpcm
209 ./raw_test@EXEEXT@
210 echo "----------------------------------------------------------------------"
211 echo " $sfversion passed tests on RAW (header-less) files."
212 echo "----------------------------------------------------------------------"
213
214 # paf-tests
215 ./write_read_test@EXEEXT@ paf
216 ./header_test@EXEEXT@ paf
217 ./misc_test@EXEEXT@ paf
218 echo "----------------------------------------------------------------------"
219 echo " $sfversion passed tests on PAF files."
220 echo "----------------------------------------------------------------------"
221
222 # svx-tests
223 ./write_read_test@EXEEXT@ svx
224 ./header_test@EXEEXT@ svx
225 ./misc_test@EXEEXT@ svx
226 echo "----------------------------------------------------------------------"
227 echo " $sfversion passed tests on SVX files."
228 echo "----------------------------------------------------------------------"
229
230 # nist-tests
231 ./write_read_test@EXEEXT@ nist
232 ./lossy_comp_test@EXEEXT@ nist_ulaw
233 ./lossy_comp_test@EXEEXT@ nist_alaw
234 ./header_test@EXEEXT@ nist
235 ./misc_test@EXEEXT@ nist
236 echo "----------------------------------------------------------------------"
237 echo " $sfversion passed tests on NIST files."
238 echo "----------------------------------------------------------------------"
239
240 # ircam-tests
241 ./write_read_test@EXEEXT@ ircam
242 ./lossy_comp_test@EXEEXT@ ircam_ulaw
243 ./lossy_comp_test@EXEEXT@ ircam_alaw
244 ./header_test@EXEEXT@ ircam
245 ./misc_test@EXEEXT@ ircam
246 echo "----------------------------------------------------------------------"
247 echo " $sfversion passed tests on IRCAM files."
248 echo "----------------------------------------------------------------------"
249
250 # voc-tests
251 ./write_read_test@EXEEXT@ voc
252 ./lossy_comp_test@EXEEXT@ voc_ulaw
253 ./lossy_comp_test@EXEEXT@ voc_alaw
254 ./header_test@EXEEXT@ voc
255 ./misc_test@EXEEXT@ voc
256 echo "----------------------------------------------------------------------"
257 echo " $sfversion passed tests on VOC files."
258 echo "----------------------------------------------------------------------"
259
260 # mat4-tests
261 ./write_read_test@EXEEXT@ mat4
262 ./header_test@EXEEXT@ mat4
263 ./misc_test@EXEEXT@ mat4
264 echo "----------------------------------------------------------------------"
265 echo " $sfversion passed tests on MAT4 files."
266 echo "----------------------------------------------------------------------"
267
268 # mat5-tests
269 ./write_read_test@EXEEXT@ mat5
270 ./header_test@EXEEXT@ mat5
271 ./misc_test@EXEEXT@ mat5
272 echo "----------------------------------------------------------------------"
273 echo " $sfversion passed tests on MAT5 files."
274 echo "----------------------------------------------------------------------"
275
276 # pvf-tests
277 ./write_read_test@EXEEXT@ pvf
278 ./header_test@EXEEXT@ pvf
279 ./misc_test@EXEEXT@ pvf
280 echo "----------------------------------------------------------------------"
281 echo " $sfversion passed tests on PVF files."
282 echo "----------------------------------------------------------------------"
283
284 # xi-tests
285 ./lossy_comp_test@EXEEXT@ xi_dpcm
286 echo "----------------------------------------------------------------------"
287 echo " $sfversion passed tests on XI files."
288 echo "----------------------------------------------------------------------"
289
290 # htk-tests
291 ./write_read_test@EXEEXT@ htk
292 ./header_test@EXEEXT@ htk
293 ./misc_test@EXEEXT@ htk
294 echo "----------------------------------------------------------------------"
295 echo " $sfversion passed tests on HTK files."
296 echo "----------------------------------------------------------------------"
297
298 # avr-tests
299 ./write_read_test@EXEEXT@ avr
300 ./header_test@EXEEXT@ avr
301 ./misc_test@EXEEXT@ avr
302 echo "----------------------------------------------------------------------"
303 echo " $sfversion passed tests on AVR files."
304 echo "----------------------------------------------------------------------"
305
306 # sds-tests
307 ./write_read_test@EXEEXT@ sds
308 ./header_test@EXEEXT@ sds
309 ./misc_test@EXEEXT@ sds
310 echo "----------------------------------------------------------------------"
311 echo " $sfversion passed tests on SDS files."
312 echo "----------------------------------------------------------------------"
313
314 # sd2-tests
315 ./write_read_test@EXEEXT@ sd2
316 echo "----------------------------------------------------------------------"
317 echo " $sfversion passed tests on SD2 files."
318 echo "----------------------------------------------------------------------"
319
320 # wve-tests
321 ./lossy_comp_test@EXEEXT@ wve
322 echo "----------------------------------------------------------------------"
323 echo " $sfversion passed tests on WVE files."
324 echo "----------------------------------------------------------------------"
325
326 # mpc2k-tests
327 ./write_read_test@EXEEXT@ mpc2k
328 ./header_test@EXEEXT@ mpc2k
329 ./misc_test@EXEEXT@ mpc2k
330 echo "----------------------------------------------------------------------"
331 echo " $sfversion passed tests on MPC 2000 files."
332 echo "----------------------------------------------------------------------"
333
334 # flac-tests
335 ./write_read_test@EXEEXT@ flac
336 ./string_test@EXEEXT@ flac
337 echo "----------------------------------------------------------------------"
338 echo " $sfversion passed tests on FLAC files."
339 echo "----------------------------------------------------------------------"
340
341 # vorbis-tests
342 ./ogg_test@EXEEXT@
343 ./vorbis_test@EXEEXT@
344 ./lossy_comp_test@EXEEXT@ ogg_vorbis
345 ./string_test@EXEEXT@ ogg
346 ./misc_test@EXEEXT@ ogg
347 echo "----------------------------------------------------------------------"
348 echo " $sfversion passed tests on OGG/VORBIS files."
349 echo "----------------------------------------------------------------------"
350
351 # io-tests
352 ./stdio_test@EXEEXT@
353 ./pipe_test@EXEEXT@
354 ./virtual_io_test@EXEEXT@
355 echo "----------------------------------------------------------------------"
356 echo " $sfversion passed stdio/pipe/vio tests."
357 echo "----------------------------------------------------------------------"
358
359