Commit 9b145187 authored by Josh Coalson's avatar Josh Coalson
Browse files

add FLAC__EXHAUSTIVE_TESTS

parent 6efda25d
......@@ -93,6 +93,18 @@ if test x$use_3dnow = xtrue ; then
AC_DEFINE(FLAC__USE_3DNOW)
fi
AC_ARG_ENABLE(exhaustive-tests,
[ --enable-exhaustive-tests Enable exhaustive testing ("make check" will take a LONG time!)],
[case "${enableval}" in
yes) exhaustive_tests=true ;;
no) exhaustive_tests=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-exhaustive-tests) ;;
esac],[exhaustive_tests=false])
AM_CONDITIONAL(FLaC__EXHAUSTIVE_TESTS, test x$exhaustive_tests = xtrue)
if test x$exhaustive_tests = xtrue ; then
AC_DEFINE(FLAC__EXHAUSTIVE_TESTS)
fi
AM_PATH_OGG(have_ogg=yes, AC_MSG_WARN([*** Ogg development enviroment not installed - Ogg support will not be built]))
AM_CONDITIONAL(FLaC__HAS_OGG, [test x$have_ogg = xyes])
if test x$have_ogg = xyes ; then
......
......@@ -15,6 +15,12 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
if FLaC__EXHAUSTIVE_TESTS
TESTS_ENVIRONMENT = FLAC__EXHAUSTIVE_TESTS=yes
else
TESTS_ENVIRONMENT = FLAC__EXHAUSTIVE_TESTS=no
endif
if FLaC__HAS_OGG
OGG_TESTS = \
./test_libOggFLAC.sh \
......@@ -40,7 +46,11 @@ EXTRA_DIST = \
test_bins.sh
CLEANFILES = \
$(wildcard *.raw) $(wildcard *.flac) $(wildcard *.ogg) $(wildcard *.cmp) $(wildcard *.wav) \
$(wildcard *.raw) \
$(wildcard *.flac) \
$(wildcard *.ogg) \
$(wildcard *.cmp) \
$(wildcard *.wav) \
$(wildcard ../../test_files/bins/*.raw) \
$(wildcard ../../test_files/bins/*.flac) \
$(wildcard ../../test_files/bins/*.cmp) \
......
......@@ -19,13 +19,13 @@
# GNU makefile
#
all: clean
./test_libFLAC.sh
./test_libFLAC++.sh
./test_libOggFLAC.sh
./test_libOggFLAC++.sh
./test_metaflac.sh
./test_streams.sh
./test_bins.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_libFLAC.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_libFLAC++.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_libOggFLAC.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_libOggFLAC++.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_metaflac.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_streams.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_bins.sh
debug: all
......
......@@ -31,7 +31,7 @@ test_file ()
bps=$3
encode_options="$4"
echo -n "$name: encode..."
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"
echo "### ENCODE $name #######################################################" >> ./streams.log
echo "### cmd=$cmd" >> ./streams.log
......@@ -60,15 +60,18 @@ test_file ()
echo "Testing bins..."
for f in b00 b01 b02 b03 ; do
for opt in 0 1 2 4 5 6 8 ; do
for extras in '' '--qlp-coeff-precision-search' '--exhaustive-model-search' ; do
for blocksize in '' '--blocksize=32' '--blocksize=32768' '--blocksize=65535' ; do
for channels in 1 2 4 8 ; do
for bps in 8 16 24 ; do
for channels in 1 2 4 8 ; do
for bps in 8 16 24 ; do
for opt in 0 1 2 4 5 6 8 ; do
for extras in '' '-p' '-e' ; do
for blocksize in '' '-b 32' '--lax -b 32768' '--lax -b 65535' ; do
test_file $BINS_PATH/$f $channels $bps "-$opt $extras $blocksize"
done
done
done
if [ "$FLAC__EXHAUSTIVE_TESTS" = yes ] ; then
test_file $BINS_PATH/$f $channels $bps "-b 16384 -m -r 8 -l 32 -e -p"
fi
done
done
done
......@@ -134,7 +134,7 @@ test_file ()
bps=$3
encode_options="$4"
echo -n "$name: encode..."
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.raw"
echo "### ENCODE $name #######################################################" >> ./streams.log
echo "### cmd=$cmd" >> ./streams.log
......@@ -221,94 +221,109 @@ test_file_piped ()
echo OK
}
if [ "$FLAC__EXHAUSTIVE_TESTS" = yes ] ; then
max_lpc_order=32
else
max_lpc_order=16
fi
echo "Testing noise through pipes..."
test_file_piped noise 1 8 "-0"
echo "Testing small files..."
test_file test01 1 16 "-0 --max-lpc-order=16 --mid-side --exhaustive-model-search --qlp-coeff-precision-search"
test_file test02 2 16 "-0 --max-lpc-order=16 --mid-side --exhaustive-model-search --qlp-coeff-precision-search"
test_file test03 1 16 "-0 --max-lpc-order=16 --mid-side --exhaustive-model-search --qlp-coeff-precision-search"
test_file test04 2 16 "-0 --max-lpc-order=16 --mid-side --exhaustive-model-search --qlp-coeff-precision-search"
test_file test01 1 16 "-0 -l $max_lpc_order -m -e -p"
test_file test02 2 16 "-0 -l $max_lpc_order -m -e -p"
test_file test03 1 16 "-0 -l $max_lpc_order -m -e -p"
test_file test04 2 16 "-0 -l $max_lpc_order -m -e -p"
echo "Testing 8-bit full-scale deflection streams..."
for b in 01 02 03 04 05 06 07 ; do
test_file fsd8-$b 1 8 "-0 --max-lpc-order=16 --mid-side --exhaustive-model-search --qlp-coeff-precision-search"
test_file fsd8-$b 1 8 "-0 -l $max_lpc_order -m -e -p"
done
echo "Testing 16-bit full-scale deflection streams..."
for b in 01 02 03 04 05 06 07 ; do
test_file fsd16-$b 1 16 "-0 --max-lpc-order=16 --mid-side --exhaustive-model-search --qlp-coeff-precision-search"
test_file fsd16-$b 1 16 "-0 -l $max_lpc_order -m -e -p"
done
echo "Testing 24-bit full-scale deflection streams..."
for b in 01 02 03 04 05 06 07 ; do
test_file fsd24-$b 1 24 "-0 --max-lpc-order=16 --mid-side --exhaustive-model-search --qlp-coeff-precision-search"
test_file fsd24-$b 1 24 "-0 -l $max_lpc_order -m -e -p"
done
echo "Testing 16-bit wasted-bits-per-sample streams..."
for b in 01 ; do
test_file wbps16-$b 1 16 "-0 --max-lpc-order=16 --mid-side --exhaustive-model-search --qlp-coeff-precision-search"
test_file wbps16-$b 1 16 "-0 -l $max_lpc_order -m -e -p"
done
for bps in 8 16 24 ; do
echo "Testing $bps-bit sine wave streams..."
for b in 00 ; do
test_file sine${bps}-$b 1 $bps "-0 --max-lpc-order=16 --mid-side --exhaustive-model-search --sample-rate=48000"
test_file sine${bps}-$b 1 $bps "-0 -l $max_lpc_order -m -e --sample-rate=48000"
done
for b in 01 ; do
test_file sine${bps}-$b 1 $bps "-0 --max-lpc-order=16 --mid-side --exhaustive-model-search --sample-rate=96000"
test_file sine${bps}-$b 1 $bps "-0 -l $max_lpc_order -m -e --sample-rate=96000"
done
for b in 02 03 04 ; do
test_file sine${bps}-$b 1 $bps "-0 --max-lpc-order=16 --mid-side --exhaustive-model-search"
test_file sine${bps}-$b 1 $bps "-0 -l $max_lpc_order -m -e"
done
for b in 10 11 ; do
test_file sine${bps}-$b 2 $bps "-0 --max-lpc-order=16 --mid-side --exhaustive-model-search --sample-rate=48000"
test_file sine${bps}-$b 2 $bps "-0 -l $max_lpc_order -m -e --sample-rate=48000"
done
for b in 12 ; do
test_file sine${bps}-$b 2 $bps "-0 --max-lpc-order=16 --mid-side --exhaustive-model-search --sample-rate=96000"
test_file sine${bps}-$b 2 $bps "-0 -l $max_lpc_order -m -e --sample-rate=96000"
done
for b in 13 14 15 16 17 18 19 ; do
test_file sine${bps}-$b 2 $bps "-0 --max-lpc-order=16 --mid-side --exhaustive-model-search"
test_file sine${bps}-$b 2 $bps "-0 -l $max_lpc_order -m -e"
done
done
echo "Testing some frame header variations..."
test_file sine16-01 1 16 "-0 --max-lpc-order=8 --mid-side --exhaustive-model-search --qlp-coeff-precision-search --lax --blocksize=16"
test_file sine16-01 1 16 "-0 --max-lpc-order=8 --mid-side --exhaustive-model-search --qlp-coeff-precision-search --lax --blocksize=65535"
test_file sine16-01 1 16 "-0 --max-lpc-order=8 --mid-side --exhaustive-model-search --qlp-coeff-precision-search --blocksize=16"
test_file sine16-01 1 16 "-0 --max-lpc-order=8 --mid-side --exhaustive-model-search --qlp-coeff-precision-search --blocksize=65535"
test_file sine16-01 1 16 "-0 --max-lpc-order=8 --mid-side --exhaustive-model-search --qlp-coeff-precision-search --lax --sample-rate=9"
test_file sine16-01 1 16 "-0 --max-lpc-order=8 --mid-side --exhaustive-model-search --qlp-coeff-precision-search --lax --sample-rate=90"
test_file sine16-01 1 16 "-0 --max-lpc-order=8 --mid-side --exhaustive-model-search --qlp-coeff-precision-search --lax --sample-rate=90000"
test_file sine16-01 1 16 "-0 --max-lpc-order=8 --mid-side --exhaustive-model-search --qlp-coeff-precision-search --sample-rate=9"
test_file sine16-01 1 16 "-0 --max-lpc-order=8 --mid-side --exhaustive-model-search --qlp-coeff-precision-search --sample-rate=90"
test_file sine16-01 1 16 "-0 --max-lpc-order=8 --mid-side --exhaustive-model-search --qlp-coeff-precision-search --sample-rate=90000"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p -b $max_lpc_order"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax -b $max_lpc_order"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax -b 65535"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=9"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=90"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=90000"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --sample-rate=9"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --sample-rate=90"
test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --sample-rate=90000"
echo "Testing option variations..."
for f in 00 01 02 03 04 ; do
for opt in 0 1 2 4 5 6 8 ; do
for extras in '' '--qlp-coeff-precision-search' '--exhaustive-model-search' ; do
for extras in '' '-p' '-e' ; do
test_file sine16-$f 1 16 "-$opt $extras"
done
done
if [ "$FLAC__EXHAUSTIVE_TESTS" = yes ] ; then
test_file sine16-$f 1 16 "-b 16384 -m -r 8 -l $max_lpc_order -e -p"
fi
done
for f in 10 11 12 13 14 15 16 17 18 19 ; do
for opt in 0 1 2 4 5 6 8 ; do
for extras in '' '--qlp-coeff-precision-search' '--exhaustive-model-search' ; do
for extras in '' '-p' '-e' ; do
test_file sine16-$f 2 16 "-$opt $extras"
done
done
if [ "$FLAC__EXHAUSTIVE_TESTS" = yes ] ; then
test_file sine16-$f 2 16 "-b 16384 -m -r 8 -l $max_lpc_order -e -p"
fi
done
echo "Testing noise..."
for opt in 0 1 2 3 4 5 6 7 8 ; do
for extras in '' '--qlp-coeff-precision-search' '--exhaustive-model-search' ; do
for blocksize in '' '--blocksize=32' '--blocksize=32768' '--blocksize=65535' ; do
for channels in 1 2 4 8 ; do
for bps in 8 16 24 ; do
for channels in 1 2 4 8 ; do
for bps in 8 16 24 ; do
for opt in 0 1 2 3 4 5 6 7 8 ; do
for extras in '' '-p' '-e' ; do
for blocksize in '' '-b 32' '--lax -b 32768' '--lax -b 65535' ; do
test_file noise $channels $bps "-$opt $extras $blocksize"
done
done
done
if [ "$FLAC__EXHAUSTIVE_TESTS" = yes ] ; then
test_file noise $channels $bps "-b 16384 -m -r 8 -l $max_lpc_order -e -p"
fi
done
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment