From 68d13215e654799bdb1155759a4372c9c21801a9 Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Tue, 14 Sep 2004 00:25:43 +0000 Subject: [PATCH] run metaflac under valgrind also if requested --- test/test_flac.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/test_flac.sh b/test/test_flac.sh index b9589de..c62b84f 100755 --- a/test/test_flac.sh +++ b/test/test_flac.sh @@ -38,6 +38,15 @@ run_flac () fi } +run_metaflac () +{ + if [ x"$FLAC__VALGRIND" = xyes ] ; then + valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 metaflac $* 4>>test_metaflac.valgrind.log + else + metaflac $* + fi +} + if [ `env | grep -ic '^comspec='` != 0 ] ; then is_win=yes else @@ -520,7 +529,7 @@ echo "Testing seek extremes:" run_flac --verify --force --silent --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=16 --channels=2 --blocksize=576 noise.raw || die "ERROR generating FLAC file" if [ $is_win = no ] ; then - total_samples=`metaflac --show-total-samples noise.flac` + total_samples=`run_metaflac --show-total-samples noise.flac` [ $? = 0 ] || die "ERROR getting total sample count from noise.flac" else # some flavors of cygwin don't seem to treat the \x0d as a word @@ -733,7 +742,7 @@ echo -n "encode... " # set the total sample count to 0 if [ $is_win = yes ] ; then run_flac $raw_eopt noise.raw -o fixup.flac || die "ERROR generating FLAC file" - metaflac --set-total-samples=0 fixup.flac 2> /dev/null + run_metaflac --set-total-samples=0 fixup.flac 2> /dev/null else cat noise.raw | run_flac $raw_eopt - -c > fixup.flac || die "ERROR generating FLAC file" fi @@ -758,7 +767,7 @@ echo -n "encode... " # set the total sample count to 0 if [ $is_win = yes ] ; then run_flac $raw_eopt noise.raw -o fixup.flac || die "ERROR generating FLAC file" - metaflac --set-total-samples=0 fixup.flac 2> /dev/null + run_metaflac --set-total-samples=0 fixup.flac 2> /dev/null else cat noise.raw | run_flac $raw_eopt - -c > fixup.flac || die "ERROR generating FLAC file" fi -- 2.7.4