regression_tests.sh.in 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #!/bin/sh
  2. #
  3. # broadvoice - a library for the BroadVoice 16 and 32 codecs
  4. #
  5. # regression_tests.sh
  6. #
  7. # This program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License version 2, as
  9. # published by the Free Software Foundation.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. STDOUT_DEST=xyzzy
  20. STDERR_DEST=xyzzy2
  21. VECTOR_CLASS=@BROADVOICE_VECTORS_FOR_TESTS@
  22. TMP_FILE=tmp
  23. echo Performing basic BroadVoice 16 and 32 regression tests
  24. echo
  25. ./broadvoice_tests E I 32000 ../test-data/broadcom/$VECTOR_CLASS/bv32/tv.raw $TMP_FILE
  26. diff $TMP_FILE ../test-data/broadcom/$VECTOR_CLASS/bv32/tv.bv32.ref
  27. RETVAL=$?
  28. if [ $RETVAL != 0 ]
  29. then
  30. echo broadvoice_tests encode failed!
  31. exit $RETVAL
  32. fi
  33. ./broadvoice_tests E I 16000 ../test-data/broadcom/$VECTOR_CLASS/bv16/tv.raw $TMP_FILE
  34. diff $TMP_FILE ../test-data/broadcom/$VECTOR_CLASS/bv16/tv.bv16.ref
  35. RETVAL=$?
  36. if [ $RETVAL != 0 ]
  37. then
  38. echo broadvoice_tests encode failed!
  39. exit $RETVAL
  40. fi
  41. echo broadvoice_tests encode completed OK
  42. ./broadvoice_tests D I 32000 ../test-data/broadcom/$VECTOR_CLASS/bv32/tv.bv32.ref $TMP_FILE
  43. diff $TMP_FILE ../test-data/broadcom/$VECTOR_CLASS/bv32/tv.bv32.ref.raw
  44. RETVAL=$?
  45. if [ $RETVAL != 0 ]
  46. then
  47. echo broadvoice_tests decode failed!
  48. exit $RETVAL
  49. fi
  50. ./broadvoice_tests D I 16000 ../test-data/broadcom/$VECTOR_CLASS/bv16/tv.bv16.ref $TMP_FILE
  51. diff $TMP_FILE ../test-data/broadcom/$VECTOR_CLASS/bv16/tv.bv16.ref.raw
  52. RETVAL=$?
  53. if [ $RETVAL != 0 ]
  54. then
  55. echo broadvoice_tests decode failed!
  56. exit $RETVAL
  57. fi
  58. ./broadvoice_tests D I 32000 ../test-data/broadcom/$VECTOR_CLASS/bv32/tv.bfe10.bv32 $TMP_FILE
  59. diff $TMP_FILE ../test-data/broadcom/$VECTOR_CLASS/bv32/tv.bv32.bfe10.ref.raw
  60. RETVAL=$?
  61. if [ $RETVAL != 0 ]
  62. then
  63. echo broadvoice_tests decode failed!
  64. exit $RETVAL
  65. fi
  66. ./broadvoice_tests D I 16000 ../test-data/broadcom/$VECTOR_CLASS/bv16/tv.bfe10.bv16 $TMP_FILE
  67. diff $TMP_FILE ../test-data/broadcom/$VECTOR_CLASS/bv16/tv.bv16.bfe10.ref.raw
  68. RETVAL=$?
  69. if [ $RETVAL != 0 ]
  70. then
  71. echo broadvoice_tests decode failed!
  72. exit $RETVAL
  73. fi
  74. echo broadvoice_tests decode completed OK
  75. echo
  76. echo All regression tests successfully completed