switch from --logfile-fd= to --log-fd= to match newer valgrind options
[platform/upstream/flac.git] / test / test_flac.sh
index 3186423..af916ea 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #  FLAC - Free Lossless Audio Codec
-#  Copyright (C) 2001,2002,2003,2004,2005,2006  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
@@ -58,7 +58,8 @@ flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable"
 run_flac ()
 {
        if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
-               valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_flac.valgrind.log
+               echo "valgrind --leak-check=yes --show-reachable=yes --num-callers=100 flac $*" >>test_flac.valgrind.log
+               valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --log-fd=4 flac $* 4>>test_flac.valgrind.log
        else
                flac $*
        fi
@@ -67,7 +68,8 @@ run_flac ()
 run_metaflac ()
 {
        if [ x"$FLAC__TEST_WITH_VALGRIND" = xyes ] ; then
-               valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 metaflac $* 4>>test_flac.valgrind.log
+               echo "valgrind --leak-check=yes --show-reachable=yes --num-callers=100 metaflac $*" >>test_flac.valgrind.log
+               valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --log-fd=4 metaflac $* 4>>test_flac.valgrind.log
        else
                metaflac $*
        fi
@@ -297,7 +299,7 @@ dd if=master.raw ibs=1 skip=20 count=20 of=50c.skip20.until40.raw 2>/dev/null ||
 wav_eopt="$SILENT --force --verify --no-padding --lax"
 wav_dopt="$SILENT --force --decode"
 
-raw_eopt="$wav_eopt --force-raw-format --endian=big --sign=signed --sample-rate=10 --bps=8 --channels=1
+raw_eopt="$wav_eopt --force-raw-format --endian=big --sign=signed --sample-rate=10 --bps=8 --channels=1"
 raw_dopt="$wav_dopt --force-raw-format --endian=big --sign=signed"
 
 #
@@ -1123,7 +1125,7 @@ echo "Testing the metadata-handling properties of flac-to-flac encoding..."
 testdir="flac-to-flac-metadata-test-files"
 filter ()
 {
-       # minor danger, changing vendor strings will change the length of the
+       # minor danger, changing vendor strings might change the length of the
        # VORBIS_COMMENT block, but if we add "^  length: " to the patterns,
        # we lose info about PADDING size that we need
        grep -Ev '^  vendor string: |^  m..imum .....size: ' | sed -e 's/, stream_offset.*//'