Josh Coalson | b598894 | 2002-06-07 06:10:08 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # FLAC - Free Lossless Audio Codec |
Josh Coalson | e74bd95 | 2007-02-02 06:58:19 +0000 | [diff] [blame] | 4 | # Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson |
Josh Coalson | b598894 | 2002-06-07 06:10:08 +0000 | [diff] [blame] | 5 | # |
Josh Coalson | e8a7601 | 2003-02-07 00:14:32 +0000 | [diff] [blame] | 6 | # This file is part the FLAC project. FLAC is comprised of several |
| 7 | # components distributed under difference licenses. The codec libraries |
| 8 | # are distributed under Xiph.Org's BSD-like license (see the file |
| 9 | # COPYING.Xiph in this distribution). All other programs, libraries, and |
| 10 | # plugins are distributed under the GPL (see COPYING.GPL). The documentation |
| 11 | # is distributed under the Gnu FDL (see COPYING.FDL). Each file in the |
| 12 | # FLAC distribution contains at the top the terms under which it may be |
| 13 | # distributed. |
Josh Coalson | b598894 | 2002-06-07 06:10:08 +0000 | [diff] [blame] | 14 | # |
Josh Coalson | e8a7601 | 2003-02-07 00:14:32 +0000 | [diff] [blame] | 15 | # Since this particular file is relevant to all components of FLAC, |
| 16 | # it may be distributed under the Xiph.Org license, which is the least |
| 17 | # restrictive of those mentioned above. See the file COPYING.Xiph in this |
| 18 | # distribution. |
Josh Coalson | b598894 | 2002-06-07 06:10:08 +0000 | [diff] [blame] | 19 | |
Josh Coalson | 6218b34 | 2002-12-12 03:58:18 +0000 | [diff] [blame] | 20 | die () |
| 21 | { |
| 22 | echo $* 1>&2 |
| 23 | exit 1 |
| 24 | } |
| 25 | |
Josh Coalson | b43d3cb | 2004-11-09 01:28:05 +0000 | [diff] [blame] | 26 | if [ x = x"$1" ] ; then |
| 27 | BUILD=debug |
| 28 | else |
| 29 | BUILD="$1" |
| 30 | fi |
| 31 | |
| 32 | LD_LIBRARY_PATH=../src/libFLAC/.libs:$LD_LIBRARY_PATH |
| 33 | LD_LIBRARY_PATH=../src/share/grabbag/.libs:$LD_LIBRARY_PATH |
| 34 | LD_LIBRARY_PATH=../src/share/replaygain_analysis/.libs:$LD_LIBRARY_PATH |
| 35 | LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH |
Josh Coalson | b598894 | 2002-06-07 06:10:08 +0000 | [diff] [blame] | 36 | export LD_LIBRARY_PATH |
Josh Coalson | b43d3cb | 2004-11-09 01:28:05 +0000 | [diff] [blame] | 37 | PATH=../src/test_libFLAC:$PATH |
| 38 | PATH=../obj/$BUILD/bin:$PATH |
Josh Coalson | b598894 | 2002-06-07 06:10:08 +0000 | [diff] [blame] | 39 | |
Josh Coalson | 34c1ea8 | 2002-12-04 04:57:33 +0000 | [diff] [blame] | 40 | run_test_libFLAC () |
| 41 | { |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 42 | if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then |
Josh Coalson | 80936c5 | 2002-12-30 23:31:47 +0000 | [diff] [blame] | 43 | valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libFLAC $* 4>>test_libFLAC.valgrind.log |
Josh Coalson | 34c1ea8 | 2002-12-04 04:57:33 +0000 | [diff] [blame] | 44 | else |
| 45 | test_libFLAC $* |
| 46 | fi |
| 47 | } |
| 48 | |
Josh Coalson | 6218b34 | 2002-12-12 03:58:18 +0000 | [diff] [blame] | 49 | run_test_libFLAC || die "ERROR during test_libFLAC" |