test_wrapper.sh.in
上传用户:shw771010
上传日期:2022-01-05
资源大小:991k
文件大小:11k
源码类别:

Audio

开发平台:

Unix_Linux

  1. #!/bin/sh
  2. HOST_TRIPLET=@HOST_TRIPLET@
  3. PACKAGE_VERSION=@PACKAGE_VERSION@
  4. LIB_VERSION=`echo $PACKAGE_VERSION | sed "s/[a-z].*//"`
  5. if test -f tests/sfversion@EXEEXT@ ; then
  6. cd tests
  7. fi
  8. if test ! -f sfversion@EXEEXT@ ; then
  9. echo "Not able to find test executables."
  10. exit 1
  11. fi
  12. if test -f libsndfile.so.$LIB_VERSION ; then
  13. # This will work on Linux, but not on Mac.
  14. # Windows is already sorted out.
  15. export LD_LIBRARY_PATH=`pwd`
  16. if test ! -f libsndfile.so.1 ; then
  17. ln -s libsndfile.so.$LIB_VERSION libsndfile.so.1
  18. fi
  19. fi
  20. sfversion=`./sfversion@EXEEXT@`
  21. if test $sfversion != libsndfile-$PACKAGE_VERSION ; then
  22. echo "Error : sfversion ($sfversion) and PACKAGE_VERSION ($PACKAGE_VERSION) don't match."
  23. exit 1
  24. fi
  25. # Force exit on errors.
  26. set -e
  27. # Generic-tests
  28. uname -a
  29. # Need this for when we're running from files collected into the
  30. # libsndfile-testsuite-@PACKAGE_VERSION@ tarball.
  31. if test -x test_main@EXEEXT@ ; then
  32. echo "Running unit tests from src/ directory of source code tree."
  33. ./test_main@EXEEXT@
  34. echo
  35. echo "Running end-to-end tests from tests/ directory."
  36. fi
  37. ./error_test@EXEEXT@
  38. ./pcm_test@EXEEXT@
  39. ./ulaw_test@EXEEXT@
  40. ./alaw_test@EXEEXT@
  41. ./dwvw_test@EXEEXT@
  42. ./command_test@EXEEXT@ ver
  43. ./command_test@EXEEXT@ norm
  44. ./command_test@EXEEXT@ format
  45. ./command_test@EXEEXT@ peak
  46. ./command_test@EXEEXT@ trunc
  47. ./command_test@EXEEXT@ inst
  48. ./command_test@EXEEXT@ current_sf_info
  49. ./command_test@EXEEXT@ bext
  50. ./command_test@EXEEXT@ bextch
  51. ./command_test@EXEEXT@ chanmap
  52. ./floating_point_test@EXEEXT@
  53. ./checksum_test@EXEEXT@
  54. ./scale_clip_test@EXEEXT@
  55. ./headerless_test@EXEEXT@
  56. ./locale_test@EXEEXT@
  57. ./win32_ordinal_test@EXEEXT@
  58. ./external_libs_test@EXEEXT@
  59. # The win64 G++ compiler requires an extra runtime DLL which
  60. # we don't have, so skip the following test on win64.
  61. if test "$HOST_TRIPLET" != "x86_64-w64-mingw32" ; then
  62. ./cpp_test@EXEEXT@
  63. fi
  64. echo "----------------------------------------------------------------------"
  65. echo "  $sfversion passed common tests."
  66. echo "----------------------------------------------------------------------"
  67. # aiff-tests
  68. ./write_read_test@EXEEXT@ aiff
  69. ./lossy_comp_test@EXEEXT@ aiff_ulaw
  70. ./lossy_comp_test@EXEEXT@ aiff_alaw
  71. ./lossy_comp_test@EXEEXT@ aiff_gsm610
  72. echo "=========================="
  73. echo "./lossy_comp_test@EXEEXT@ aiff_ima"
  74. echo "=========================="
  75. ./peak_chunk_test@EXEEXT@ aiff
  76. ./header_test@EXEEXT@ aiff
  77. ./misc_test@EXEEXT@ aiff
  78. ./string_test@EXEEXT@ aiff
  79. ./multi_file_test@EXEEXT@ aiff
  80. ./aiff_rw_test@EXEEXT@
  81. echo "----------------------------------------------------------------------"
  82. echo "  $sfversion passed tests on AIFF files."
  83. echo "----------------------------------------------------------------------"
  84. # au-tests
  85. ./write_read_test@EXEEXT@ au
  86. ./lossy_comp_test@EXEEXT@ au_ulaw
  87. ./lossy_comp_test@EXEEXT@ au_alaw
  88. ./lossy_comp_test@EXEEXT@ au_g721
  89. ./lossy_comp_test@EXEEXT@ au_g723
  90. ./header_test@EXEEXT@ au
  91. ./misc_test@EXEEXT@ au
  92. ./multi_file_test@EXEEXT@ au
  93. echo "----------------------------------------------------------------------"
  94. echo "  $sfversion passed tests on AU files."
  95. echo "----------------------------------------------------------------------"
  96. # caf-tests
  97. ./write_read_test@EXEEXT@ caf
  98. ./lossy_comp_test@EXEEXT@ caf_ulaw
  99. ./lossy_comp_test@EXEEXT@ caf_alaw
  100. ./header_test@EXEEXT@ caf
  101. ./peak_chunk_test@EXEEXT@ caf
  102. ./misc_test@EXEEXT@ caf
  103. echo "----------------------------------------------------------------------"
  104. echo "  $sfversion passed tests on CAF files."
  105. echo "----------------------------------------------------------------------"
  106. # wav-tests
  107. ./write_read_test@EXEEXT@ wav
  108. ./lossy_comp_test@EXEEXT@ wav_pcm
  109. ./lossy_comp_test@EXEEXT@ wav_ima
  110. ./lossy_comp_test@EXEEXT@ wav_msadpcm
  111. ./lossy_comp_test@EXEEXT@ wav_ulaw
  112. ./lossy_comp_test@EXEEXT@ wav_alaw
  113. ./lossy_comp_test@EXEEXT@ wav_gsm610
  114. ./lossy_comp_test@EXEEXT@ wav_g721
  115. ./peak_chunk_test@EXEEXT@ wav
  116. ./header_test@EXEEXT@ wav
  117. ./misc_test@EXEEXT@ wav
  118. ./string_test@EXEEXT@ wav
  119. ./multi_file_test@EXEEXT@ wav
  120. echo "----------------------------------------------------------------------"
  121. echo "  $sfversion passed tests on WAV files."
  122. echo "----------------------------------------------------------------------"
  123. # w64-tests
  124. ./write_read_test@EXEEXT@ w64
  125. ./lossy_comp_test@EXEEXT@ w64_ima
  126. ./lossy_comp_test@EXEEXT@ w64_msadpcm
  127. ./lossy_comp_test@EXEEXT@ w64_ulaw
  128. ./lossy_comp_test@EXEEXT@ w64_alaw
  129. ./lossy_comp_test@EXEEXT@ w64_gsm610
  130. ./header_test@EXEEXT@ w64
  131. ./misc_test@EXEEXT@ w64
  132. echo "----------------------------------------------------------------------"
  133. echo "  $sfversion passed tests on W64 files."
  134. echo "----------------------------------------------------------------------"
  135. # rf64-tests
  136. ./write_read_test@EXEEXT@ rf64
  137. ./header_test@EXEEXT@ rf64
  138. ./misc_test@EXEEXT@ rf64
  139. echo "----------------------------------------------------------------------"
  140. echo "  $sfversion passed tests on RF64 files."
  141. echo "----------------------------------------------------------------------"
  142. # raw-tests
  143. ./write_read_test@EXEEXT@ raw
  144. ./lossy_comp_test@EXEEXT@ raw_ulaw
  145. ./lossy_comp_test@EXEEXT@ raw_alaw
  146. ./lossy_comp_test@EXEEXT@ raw_gsm610
  147. ./lossy_comp_test@EXEEXT@ vox_adpcm
  148. ./raw_test@EXEEXT@
  149. echo "----------------------------------------------------------------------"
  150. echo "  $sfversion passed tests on RAW (header-less) files."
  151. echo "----------------------------------------------------------------------"
  152. # paf-tests
  153. ./write_read_test@EXEEXT@ paf
  154. ./header_test@EXEEXT@ paf
  155. ./misc_test@EXEEXT@ paf
  156. echo "----------------------------------------------------------------------"
  157. echo "  $sfversion passed tests on PAF files."
  158. echo "----------------------------------------------------------------------"
  159. # svx-tests
  160. ./write_read_test@EXEEXT@ svx
  161. ./header_test@EXEEXT@ svx
  162. ./misc_test@EXEEXT@ svx
  163. echo "----------------------------------------------------------------------"
  164. echo "  $sfversion passed tests on SVX files."
  165. echo "----------------------------------------------------------------------"
  166. # nist-tests
  167. ./write_read_test@EXEEXT@ nist
  168. ./lossy_comp_test@EXEEXT@ nist_ulaw
  169. ./lossy_comp_test@EXEEXT@ nist_alaw
  170. ./header_test@EXEEXT@ nist
  171. ./misc_test@EXEEXT@ nist
  172. echo "----------------------------------------------------------------------"
  173. echo "  $sfversion passed tests on NIST files."
  174. echo "----------------------------------------------------------------------"
  175. # ircam-tests
  176. ./write_read_test@EXEEXT@ ircam
  177. ./lossy_comp_test@EXEEXT@ ircam_ulaw
  178. ./lossy_comp_test@EXEEXT@ ircam_alaw
  179. ./header_test@EXEEXT@ ircam
  180. ./misc_test@EXEEXT@ ircam
  181. echo "----------------------------------------------------------------------"
  182. echo "  $sfversion passed tests on IRCAM files."
  183. echo "----------------------------------------------------------------------"
  184. # voc-tests
  185. ./write_read_test@EXEEXT@ voc
  186. ./lossy_comp_test@EXEEXT@ voc_ulaw
  187. ./lossy_comp_test@EXEEXT@ voc_alaw
  188. ./header_test@EXEEXT@ voc
  189. ./misc_test@EXEEXT@ voc
  190. echo "----------------------------------------------------------------------"
  191. echo "  $sfversion passed tests on VOC files."
  192. echo "----------------------------------------------------------------------"
  193. # mat4-tests
  194. ./write_read_test@EXEEXT@ mat4
  195. ./header_test@EXEEXT@ mat4
  196. ./misc_test@EXEEXT@ mat4
  197. echo "----------------------------------------------------------------------"
  198. echo "  $sfversion passed tests on MAT4 files."
  199. echo "----------------------------------------------------------------------"
  200. # mat5-tests
  201. ./write_read_test@EXEEXT@ mat5
  202. ./header_test@EXEEXT@ mat5
  203. ./misc_test@EXEEXT@ mat5
  204. echo "----------------------------------------------------------------------"
  205. echo "  $sfversion passed tests on MAT5 files."
  206. echo "----------------------------------------------------------------------"
  207. # pvf-tests
  208. ./write_read_test@EXEEXT@ pvf
  209. ./header_test@EXEEXT@ pvf
  210. ./misc_test@EXEEXT@ pvf
  211. echo "----------------------------------------------------------------------"
  212. echo "  $sfversion passed tests on PVF files."
  213. echo "----------------------------------------------------------------------"
  214. # xi-tests
  215. ./lossy_comp_test@EXEEXT@ xi_dpcm
  216. echo "----------------------------------------------------------------------"
  217. echo "  $sfversion passed tests on XI files."
  218. echo "----------------------------------------------------------------------"
  219. # htk-tests
  220. ./write_read_test@EXEEXT@ htk
  221. ./header_test@EXEEXT@ htk
  222. ./misc_test@EXEEXT@ htk
  223. echo "----------------------------------------------------------------------"
  224. echo "  $sfversion passed tests on HTK files."
  225. echo "----------------------------------------------------------------------"
  226. # avr-tests
  227. ./write_read_test@EXEEXT@ avr
  228. ./header_test@EXEEXT@ avr
  229. ./misc_test@EXEEXT@ avr
  230. echo "----------------------------------------------------------------------"
  231. echo "  $sfversion passed tests on AVR files."
  232. echo "----------------------------------------------------------------------"
  233. # sds-tests
  234. ./write_read_test@EXEEXT@ sds
  235. ./header_test@EXEEXT@ sds
  236. ./misc_test@EXEEXT@ sds
  237. echo "----------------------------------------------------------------------"
  238. echo "  $sfversion passed tests on SDS files."
  239. echo "----------------------------------------------------------------------"
  240. # sd2-tests
  241. ./write_read_test@EXEEXT@ sd2
  242. echo "----------------------------------------------------------------------"
  243. echo "  $sfversion passed tests on SD2 files."
  244. echo "----------------------------------------------------------------------"
  245. # wve-tests
  246. ./lossy_comp_test@EXEEXT@ wve
  247. echo "----------------------------------------------------------------------"
  248. echo "  $sfversion passed tests on WVE files."
  249. echo "----------------------------------------------------------------------"
  250. # mpc2k-tests
  251. ./write_read_test@EXEEXT@ mpc2k
  252. ./header_test@EXEEXT@ mpc2k
  253. ./misc_test@EXEEXT@ mpc2k
  254. echo "----------------------------------------------------------------------"
  255. echo "  $sfversion passed tests on MPC 2000 files."
  256. echo "----------------------------------------------------------------------"
  257. # flac-tests
  258. ./write_read_test@EXEEXT@ flac
  259. ./string_test@EXEEXT@ flac
  260. echo "----------------------------------------------------------------------"
  261. echo "  $sfversion passed tests on FLAC files."
  262. echo "----------------------------------------------------------------------"
  263. # vorbis-tests
  264. ./ogg_test@EXEEXT@
  265. ./vorbis_test@EXEEXT@
  266. ./lossy_comp_test@EXEEXT@ ogg_vorbis
  267. ./string_test@EXEEXT@ ogg
  268. ./misc_test@EXEEXT@ ogg
  269. echo "----------------------------------------------------------------------"
  270. echo "  $sfversion passed tests on OGG/VORBIS files."
  271. echo "----------------------------------------------------------------------"
  272. # io-tests
  273. ./stdio_test@EXEEXT@
  274. ./pipe_test@EXEEXT@
  275. ./virtual_io_test@EXEEXT@
  276. echo "----------------------------------------------------------------------"
  277. echo "  $sfversion passed stdio/pipe/vio tests."
  278. echo "----------------------------------------------------------------------"