add support for reading the raw pcm samples so that seeker can check that decoding...
[platform/upstream/flac.git] / test / test_libFLAC.sh
index 4c22225..0a4e7c0 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #  FLAC - Free Lossless Audio Codec
-#  Copyright (C) 2001,2002,2003  Josh Coalson
+#  Copyright (C) 2001,2002,2003,2004,2005,2006,2007  Josh Coalson
 #
 #  This file is part the FLAC project.  FLAC is comprised of several
 #  components distributed under difference licenses.  The codec libraries
@@ -23,14 +23,23 @@ die ()
        exit 1
 }
 
-LD_LIBRARY_PATH=../src/libFLAC/.libs:../obj/release/lib:../obj/debug/lib:$LD_LIBRARY_PATH
+if [ x = x"$1" ] ; then 
+       BUILD=debug
+else
+       BUILD="$1"
+fi
+
+LD_LIBRARY_PATH=../src/libFLAC/.libs:$LD_LIBRARY_PATH
+LD_LIBRARY_PATH=../src/share/grabbag/.libs:$LD_LIBRARY_PATH
+LD_LIBRARY_PATH=../src/share/replaygain_analysis/.libs:$LD_LIBRARY_PATH
+LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH
 export LD_LIBRARY_PATH
-PATH=../src/test_libFLAC:../obj/release/bin:../obj/debug/bin:$PATH
-export PATH
+PATH=../src/test_libFLAC:$PATH
+PATH=../obj/$BUILD/bin:$PATH
 
 run_test_libFLAC ()
 {
-       if [ x"$FLAC__VALGRIND" = xyes ] ; then
+       if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
                valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libFLAC $* 4>>test_libFLAC.valgrind.log
        else
                test_libFLAC $*