diff options
author | Josh Coalson <jcoalson@users.sourceforce.net> | 2002-12-04 04:57:33 +0000 |
---|---|---|
committer | Josh Coalson <jcoalson@users.sourceforce.net> | 2002-12-04 04:57:33 +0000 |
commit | 34c1ea8ca2a567043d079c4a6e0baa3f0f6341d4 (patch) | |
tree | 6f97818ff043e25cb60a24031a793790da57c5a2 /test/test_bins.sh | |
parent | 23fec2b7dc23478cb6e6ae44388551c2d71c0ac9 (diff) | |
download | flac-34c1ea8ca2a567043d079c4a6e0baa3f0f6341d4.tar.gz |
instrument for valgrind
Diffstat (limited to 'test/test_bins.sh')
-rwxr-xr-x | test/test_bins.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/test/test_bins.sh b/test/test_bins.sh index b793b795..b8ee5228 100755 --- a/test/test_bins.sh +++ b/test/test_bins.sh @@ -19,14 +19,20 @@ LD_LIBRARY_PATH=../src/libFLAC/.libs:../obj/release/lib:../obj/debug/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH -PATH=../src/flac:../obj/release/b:../obj/debug/bin:$PATH +PATH=../src/flac:../obj/release/bin:../obj/debug/bin:$PATH BINS_PATH=../../test_files/bins flac --help 1>/dev/null 2>/dev/null || (echo "ERROR can't find flac executable" 1>&2 && exit 1) if [ $? != 0 ] ; then exit 1 ; fi -#FLAC="valgrind --leak-check=yes --show-reachable=yes --logfile-fd=1 flac" -FLAC=flac +run_flac () +{ + if [ "$FLAC__VALGRIND" = yes ] ; then + valgrind --leak-check=yes --show-reachable=yes --num-callers=10 --logfile-fd=4 flac $* 4>>valgrind.log + else + flac $* + fi +} test -d ${BINS_PATH} || exit 77 @@ -38,7 +44,7 @@ test_file () encode_options="$4" echo -n "$name (--channels=$channels --bps=$bps $encode_options): encode..." - cmd="$FLAC --verify --silent --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=$bps --channels=$channels $encode_options $name.bin" + cmd="run_flac --verify --silent --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=$bps --channels=$channels $encode_options $name.bin" echo "### ENCODE $name #######################################################" >> ./streams.log echo "### cmd=$cmd" >> ./streams.log if $cmd 2>>./streams.log ; then : ; else @@ -46,7 +52,7 @@ test_file () exit 1 fi echo -n "decode..." - cmd="$FLAC --silent --endian=big --sign=signed --decode --force-raw-format $name.flac"; + cmd="run_flac --silent --endian=big --sign=signed --decode --force-raw-format $name.flac"; echo "### DECODE $name #######################################################" >> ./streams.log echo "### cmd=$cmd" >> ./streams.log if $cmd 2>>./streams.log ; then : ; else |