Commit de9091e4 authored by Josh Coalson's avatar Josh Coalson

add configure options --disable-thorough-tests which breaks up testing into 3...

add configure options --disable-thorough-tests which breaks up testing into 3 levels: 0 for basic testing, 1 for thorough testing, 2 for exhaustive testing
parent daa68425
...@@ -105,7 +105,7 @@ AH_TEMPLATE(FLAC__NO_ASM, [define to disable use of assembly code]) ...@@ -105,7 +105,7 @@ AH_TEMPLATE(FLAC__NO_ASM, [define to disable use of assembly code])
fi fi
AC_ARG_ENABLE(debug, AC_ARG_ENABLE(debug,
[ --enable-debug Turn on debugging], AC_HELP_STRING([--enable-debug], [Turn on debugging]),
[case "${enableval}" in [case "${enableval}" in
yes) debug=true ;; yes) debug=true ;;
no) debug=false ;; no) debug=false ;;
...@@ -114,7 +114,7 @@ esac],[debug=false]) ...@@ -114,7 +114,7 @@ esac],[debug=false])
AM_CONDITIONAL(DEBUG, test "x$debug" = xtrue) AM_CONDITIONAL(DEBUG, test "x$debug" = xtrue)
AC_ARG_ENABLE(sse, AC_ARG_ENABLE(sse,
[ --enable-sse Enable SSE support by asserting that the OS supports SSE instructions], AC_HELP_STRING([--enable-sse], [Enable SSE support by asserting that the OS supports SSE instructions]),
[case "${enableval}" in [case "${enableval}" in
yes) sse_os=true ;; yes) sse_os=true ;;
no) sse_os=false ;; no) sse_os=false ;;
...@@ -127,7 +127,7 @@ AH_TEMPLATE(FLAC__SSE_OS, [define if your operating system supports SSE instruct ...@@ -127,7 +127,7 @@ AH_TEMPLATE(FLAC__SSE_OS, [define if your operating system supports SSE instruct
fi fi
AC_ARG_ENABLE(3dnow, AC_ARG_ENABLE(3dnow,
[ --disable-3dnow Disable 3DNOW! optimizations], AC_HELP_STRING([--disable-3dnow], [Disable 3DNOW! optimizations]),
[case "${enableval}" in [case "${enableval}" in
yes) use_3dnow=true ;; yes) use_3dnow=true ;;
no) use_3dnow=false ;; no) use_3dnow=false ;;
...@@ -140,7 +140,7 @@ AH_TEMPLATE(FLAC__USE_3DNOW, [define to enable use of 3Dnow! instructions]) ...@@ -140,7 +140,7 @@ AH_TEMPLATE(FLAC__USE_3DNOW, [define to enable use of 3Dnow! instructions])
fi fi
AC_ARG_ENABLE(altivec, AC_ARG_ENABLE(altivec,
[ --disable-altivec Disable Altivec optimizations], AC_HELP_STRING([--disable-altivec], [Disable Altivec optimizations]),
[case "${enableval}" in [case "${enableval}" in
yes) use_altivec=true ;; yes) use_altivec=true ;;
no) use_altivec=false ;; no) use_altivec=false ;;
...@@ -153,7 +153,7 @@ AH_TEMPLATE(FLAC__USE_ALTIVEC, [define to enable use of Altivec instructions]) ...@@ -153,7 +153,7 @@ AH_TEMPLATE(FLAC__USE_ALTIVEC, [define to enable use of Altivec instructions])
fi fi
AC_ARG_ENABLE(local-xmms-plugin, AC_ARG_ENABLE(local-xmms-plugin,
[ --enable-local-xmms-plugin Install XMMS plugin to ~/.xmms/Plugins instead of system location], AC_HELP_STRING([--enable-local-xmms-plugin], [Install XMMS plugin to ~/.xmms/Plugins instead of system location]),
[case "${enableval}" in [case "${enableval}" in
yes) install_xmms_plugin_locally=true ;; yes) install_xmms_plugin_locally=true ;;
no) install_xmms_plugin_locally=false ;; no) install_xmms_plugin_locally=false ;;
...@@ -161,31 +161,37 @@ AC_ARG_ENABLE(local-xmms-plugin, ...@@ -161,31 +161,37 @@ AC_ARG_ENABLE(local-xmms-plugin,
esac],[install_xmms_plugin_locally=false]) esac],[install_xmms_plugin_locally=false])
AM_CONDITIONAL(FLaC__INSTALL_XMMS_PLUGIN_LOCALLY, test "x$install_xmms_plugin_locally" = xtrue) AM_CONDITIONAL(FLaC__INSTALL_XMMS_PLUGIN_LOCALLY, test "x$install_xmms_plugin_locally" = xtrue)
AC_ARG_ENABLE(thorough-tests,
AC_HELP_STRING([--disable-thorough-tests], [Disable thorough (long) testing, do only basic tests]),
[case "${enableval}" in
yes) thorough_tests=true ;;
no) thorough_tests=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-thorough-tests) ;;
esac],[thorough_tests=true])
AC_ARG_ENABLE(exhaustive-tests, AC_ARG_ENABLE(exhaustive-tests,
[ --enable-exhaustive-tests Enable exhaustive testing], AC_HELP_STRING([--enable-exhaustive-tests], [Enable exhaustive testing (VERY long)]),
[case "${enableval}" in [case "${enableval}" in
yes) exhaustive_tests=true ;; yes) exhaustive_tests=true ;;
no) exhaustive_tests=false ;; no) exhaustive_tests=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-exhaustive-tests) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-exhaustive-tests) ;;
esac],[exhaustive_tests=false]) esac],[exhaustive_tests=false])
AM_CONDITIONAL(FLaC__EXHAUSTIVE_TESTS, test "x$exhaustive_tests" = xtrue) if test "x$thorough_tests" = xfalse ; then
if test "x$exhaustive_tests" = xtrue ; then FLAC__TEST_LEVEL=0
AC_DEFINE(FLAC__EXHAUSTIVE_TESTS) elif test "x$exhaustive_tests" = xfalse ; then
AH_TEMPLATE(FLAC__EXHAUSTIVE_TESTS, [define to run even more tests]) FLAC__TEST_LEVEL=1
else
FLAC__TEST_LEVEL=2
fi fi
AC_SUBST(FLAC__TEST_LEVEL)
AC_ARG_ENABLE(valgrind-testing, AC_ARG_ENABLE(valgrind-testing,
AC_HELP_STRING([--enable-valgrind-testing], [Run all tests inside Valgrind]), AC_HELP_STRING([--enable-valgrind-testing], [Run all tests inside Valgrind]),
[case "${enableval}" in [case "${enableval}" in
yes) valgrind_testing=true ;; yes) FLAC__TEST_WITH_VALGRIND=yes ;;
no) valgrind_testing=false ;; no) FLAC__TEST_WITH_VALGRIND=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind-testing) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind-testing) ;;
esac],[valgrind_testing=false]) esac],[FLAC__TEST_WITH_VALGRIND=no])
AM_CONDITIONAL(FLaC__VALGRIND_TESTING, test "x$valgrind_testing" = xtrue) AC_SUBST(FLAC__TEST_WITH_VALGRIND)
if test "x$valgrind_testing" = xtrue ; then
AC_DEFINE(FLAC__VALGRIND_TESTING)
AH_TEMPLATE(FLAC__VALGRIND_TESTING, [define to enable use of Valgrind in testers])
fi
AC_ARG_ENABLE(doxygen-docs, AC_ARG_ENABLE(doxygen-docs,
AC_HELP_STRING([--disable-doxygen-docs], [Disable API documentation building via Doxygen]), AC_HELP_STRING([--disable-doxygen-docs], [Disable API documentation building via Doxygen]),
......
...@@ -113,8 +113,9 @@ ...@@ -113,8 +113,9 @@
<li> <li>
build system: build system:
<ul> <ul>
<li>Added support for building on OS/2 with EMX (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1229495&group_id=13478&atid=113478">SF #1229495</a>)</li> <li>Added support for building on OS/2 with EMX (<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1229495&amp;group_id=13478&amp;atid=113478">SF #1229495</a>)</li>
<li>Added <span class="argument">--disable-doxygen-docs</span> to <span class="command">configure</span> for disabling Doxygen-based API doc generation (<a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1365935&group_id=13478&atid=313478">SF #1365935</a>).</li> <li>Added <span class="argument">--disable-doxygen-docs</span> to <span class="command">configure</span> for disabling Doxygen-based API doc generation (<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1365935&amp;group_id=13478&amp;atid=313478">SF #1365935</a>).</li>
<li>Added <span class="argument">--disable-thorough-tests</span> to <span class="command">configure</span> to do the basic library, stream, and tool tests in a reasonable time (<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1077948&amp;group_id=13478&amp;atid=363478">SF #1077948</a>).</li>
<li>Added large file support with <span class="argument">AC_SYS_LARGEFILE</span>; use <span class="argument">--disable-largefile</span> with <span class="command">configure</span> to disable.</li> <li>Added large file support with <span class="argument">AC_SYS_LARGEFILE</span>; use <span class="argument">--disable-largefile</span> with <span class="command">configure</span> to disable.</li>
</ul> </ul>
</li> </li>
......
...@@ -15,19 +15,7 @@ ...@@ -15,19 +15,7 @@
# restrictive of those mentioned above. See the file COPYING.Xiph in this # restrictive of those mentioned above. See the file COPYING.Xiph in this
# distribution. # distribution.
if FLaC__EXHAUSTIVE_TESTS TESTS_ENVIRONMENT = FLAC__TEST_LEVEL=@FLAC__TEST_LEVEL@ FLAC__TEST_WITH_VALRGIND=@FLAC__TEST_WITH_VALGRIND@
FLAC__EXHAUSTIVE_TESTS = yes
else
FLAC__EXHAUSTIVE_TESTS = no
endif
if FLaC__VALGRIND_TESTING
FLAC__VALGRIND = yes
else
FLAC__VALGRIND = no
endif
TESTS_ENVIRONMENT = FLAC__EXHAUSTIVE_TESTS=$(FLAC__EXHAUSTIVE_TESTS) FLAC__VALGRIND=$(FLAC__VALGRIND)
SUBDIRS = cuesheets SUBDIRS = cuesheets
...@@ -45,8 +33,7 @@ TESTS = \ ...@@ -45,8 +33,7 @@ TESTS = \
./test_metaflac.sh \ ./test_metaflac.sh \
./test_grabbag.sh \ ./test_grabbag.sh \
./test_seeking.sh \ ./test_seeking.sh \
./test_streams.sh \ ./test_streams.sh
./test_bins.sh
EXTRA_DIST = \ EXTRA_DIST = \
Makefile.lite \ Makefile.lite \
......
...@@ -26,24 +26,24 @@ DEFAULT_CONFIG = release ...@@ -26,24 +26,24 @@ DEFAULT_CONFIG = release
CONFIG = $(DEFAULT_CONFIG) CONFIG = $(DEFAULT_CONFIG)
all: clean all: clean
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_libFLAC.sh $(CONFIG) $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_libFLAC.sh $(CONFIG)
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_libFLAC++.sh $(CONFIG) $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_libFLAC++.sh $(CONFIG)
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_libOggFLAC.sh $(CONFIG) $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_libOggFLAC.sh $(CONFIG)
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_libOggFLAC++.sh $(CONFIG) $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_libOggFLAC++.sh $(CONFIG)
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_flac.sh $(CONFIG) $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_flac.sh $(CONFIG)
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_metaflac.sh $(CONFIG) $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_metaflac.sh $(CONFIG)
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_grabbag.sh $(CONFIG) $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_grabbag.sh $(CONFIG)
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_seeking.sh $(CONFIG) $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_seeking.sh $(CONFIG)
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_streams.sh $(CONFIG) $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_streams.sh $(CONFIG)
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_bins.sh $(CONFIG) $(FLAC__TEST_LEVEL) $(FLAC__TEST_WITH_VALGRIND) ./test_bins.sh $(CONFIG)
debug : FLAC__EXHAUSTIVE_TESTS=FLAC__EXHAUSTIVE_TESTS=yes debug : FLAC__TEST_LEVEL=FLAC__TEST_LEVEL=2
valgrind: FLAC__EXHAUSTIVE_TESTS=FLAC__EXHAUSTIVE_TESTS=no valgrind: FLAC__TEST_LEVEL=FLAC__TEST_LEVEL=1
release : FLAC__EXHAUSTIVE_TESTS=FLAC__EXHAUSTIVE_TESTS=yes release : FLAC__TEST_LEVEL=FLAC__TEST_LEVEL=2
debug : FLAC__VALGRIND=FLAC__VALGRIND=no debug : FLAC__TEST_WITH_VALGRIND=FLAC__TEST_WITH_VALGRIND=no
valgrind: FLAC__VALGRIND=FLAC__VALGRIND=yes valgrind: FLAC__TEST_WITH_VALGRIND=FLAC__TEST_WITH_VALGRIND=yes
release : FLAC__VALGRIND=FLAC__VALGRIND=no release : FLAC__TEST_WITH_VALGRIND=FLAC__TEST_WITH_VALGRIND=no
debug : CONFIG = debug debug : CONFIG = debug
valgrind: CONFIG = debug valgrind: CONFIG = debug
......
...@@ -46,7 +46,7 @@ flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable" ...@@ -46,7 +46,7 @@ flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable"
run_flac () run_flac ()
{ {
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 flac $* 4>>test_bins.valgrind.log valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_bins.valgrind.log
else else
flac $* flac $*
...@@ -98,7 +98,7 @@ for f in b00 b01 b02 b03 b04 ; do ...@@ -98,7 +98,7 @@ for f in b00 b01 b02 b03 b04 ; do
done done
done done
done done
if [ "$FLAC__EXHAUSTIVE_TESTS" = yes ] ; then if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
test_file $binfile $channels $bps "-b 16384 -m -r 8 -l 32 -e -p $disable" test_file $binfile $channels $bps "-b 16384 -m -r 8 -l 32 -e -p $disable"
fi fi
done done
......
...@@ -47,7 +47,7 @@ flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable" ...@@ -47,7 +47,7 @@ flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable"
run_flac () run_flac ()
{ {
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 flac $* 4>>test_flac.valgrind.log valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_flac.valgrind.log
else else
flac $* flac $*
...@@ -56,7 +56,7 @@ run_flac () ...@@ -56,7 +56,7 @@ run_flac ()
run_metaflac () run_metaflac ()
{ {
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 metaflac $* 4>>test_flac.valgrind.log valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 metaflac $* 4>>test_flac.valgrind.log
else else
metaflac $* metaflac $*
......
...@@ -41,7 +41,7 @@ test_cuesheet -h 1>/dev/null 2>/dev/null || die "ERROR can't find test_cuesheet ...@@ -41,7 +41,7 @@ test_cuesheet -h 1>/dev/null 2>/dev/null || die "ERROR can't find test_cuesheet
run_test_cuesheet () run_test_cuesheet ()
{ {
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_cuesheet $* 4>>test_grabbag.valgrind.log valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_cuesheet $* 4>>test_grabbag.valgrind.log
else else
test_cuesheet $* test_cuesheet $*
......
...@@ -40,7 +40,7 @@ PATH=../obj/$BUILD/bin:$PATH ...@@ -40,7 +40,7 @@ PATH=../obj/$BUILD/bin:$PATH
run_test_libFLACpp () run_test_libFLACpp ()
{ {
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 valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libFLAC++ $* 4>>test_libFLAC++.valgrind.log
else else
test_libFLAC++ $* test_libFLAC++ $*
......
...@@ -39,7 +39,7 @@ PATH=../obj/$BUILD/bin:$PATH ...@@ -39,7 +39,7 @@ PATH=../obj/$BUILD/bin:$PATH
run_test_libFLAC () 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 valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libFLAC $* 4>>test_libFLAC.valgrind.log
else else
test_libFLAC $* test_libFLAC $*
......
...@@ -41,7 +41,7 @@ PATH=../obj/$BUILD/bin:$PATH ...@@ -41,7 +41,7 @@ PATH=../obj/$BUILD/bin:$PATH
run_test_libOggFLACpp () run_test_libOggFLACpp ()
{ {
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_libOggFLAC++ $* 4>>test_libOggFLAC++.valgrind.log valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libOggFLAC++ $* 4>>test_libOggFLAC++.valgrind.log
else else
test_libOggFLAC++ $* test_libOggFLAC++ $*
......
...@@ -40,7 +40,7 @@ PATH=../obj/$BUILD/bin:$PATH ...@@ -40,7 +40,7 @@ PATH=../obj/$BUILD/bin:$PATH
run_test_libOggFLAC () run_test_libOggFLAC ()
{ {
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_libOggFLAC $* 4>>test_libOggFLAC.valgrind.log valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_libOggFLAC $* 4>>test_libOggFLAC.valgrind.log
else else
test_libOggFLAC $* test_libOggFLAC $*
......
...@@ -49,7 +49,7 @@ metaflac --help 1>/dev/null 2>/dev/null || die "ERROR can't find metaflac execut ...@@ -49,7 +49,7 @@ metaflac --help 1>/dev/null 2>/dev/null || die "ERROR can't find metaflac execut
run_flac () run_flac ()
{ {
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 flac $* 4>>test_metaflac.valgrind.log valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_metaflac.valgrind.log
else else
flac $* flac $*
...@@ -58,7 +58,7 @@ run_flac () ...@@ -58,7 +58,7 @@ run_flac ()
run_metaflac () run_metaflac ()
{ {
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 metaflac $* 4>>test_metaflac.valgrind.log valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 metaflac $* 4>>test_metaflac.valgrind.log
else else
metaflac $* metaflac $*
......
...@@ -44,7 +44,7 @@ metaflac --help 1>/dev/null 2>/dev/null || die "ERROR can't find metaflac execut ...@@ -44,7 +44,7 @@ metaflac --help 1>/dev/null 2>/dev/null || die "ERROR can't find metaflac execut
run_flac () run_flac ()
{ {
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 flac $* 4>>test_seeking.valgrind.log valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_seeking.valgrind.log
else else
flac $* flac $*
...@@ -53,7 +53,7 @@ run_flac () ...@@ -53,7 +53,7 @@ run_flac ()
run_metaflac () run_metaflac ()
{ {
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 metaflac $* 4>>test_seeking.valgrind.log valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 metaflac $* 4>>test_seeking.valgrind.log
else else
metaflac $* metaflac $*
...@@ -62,7 +62,7 @@ run_metaflac () ...@@ -62,7 +62,7 @@ run_metaflac ()
run_test_seeking () run_test_seeking ()
{ {
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_seeking $* 4>>test_seeking.valgrind.log valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 test_seeking $* 4>>test_seeking.valgrind.log
else else
test_seeking $* test_seeking $*
......
...@@ -39,7 +39,7 @@ flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable" ...@@ -39,7 +39,7 @@ flac --help 1>/dev/null 2>/dev/null || die "ERROR can't find flac executable"
run_flac () run_flac ()
{ {
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 flac $* 4>>test_streams.valgrind.log valgrind --leak-check=yes --show-reachable=yes --num-callers=100 --logfile-fd=4 flac $* 4>>test_streams.valgrind.log
else else
flac $* flac $*
...@@ -131,7 +131,7 @@ test_file_piped () ...@@ -131,7 +131,7 @@ test_file_piped ()
echo OK echo OK
} }
if [ "$FLAC__EXHAUSTIVE_TESTS" = yes ] ; then if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
max_lpc_order=32 max_lpc_order=32
else else
max_lpc_order=16 max_lpc_order=16
...@@ -212,44 +212,60 @@ test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=9000 ...@@ -212,44 +212,60 @@ test_file sine16-01 1 16 "-0 -l $max_lpc_order -m -e -p --lax --sample-rate=9000
echo "Testing option variations..." echo "Testing option variations..."
for f in 00 01 02 03 04 ; do for f in 00 01 02 03 04 ; do
for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do
for opt in 0 1 2 4 5 6 8 ; do if [ -z "$disable" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
for extras in '' '-p' '-e' ; do for opt in 0 1 2 4 5 6 8 ; do
test_file sine16-$f 1 16 "-$opt $extras $disable" for extras in '' '-p' '-e' ; do
if [ -z "$extras" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
test_file sine16-$f 1 16 "-$opt $extras $disable"
fi
done
done done
done if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
if [ "$FLAC__EXHAUSTIVE_TESTS" = yes ] ; then test_file sine16-$f 1 16 "-b 16384 -m -r 8 -l $max_lpc_order -e -p $disable"
test_file sine16-$f 1 16 "-b 16384 -m -r 8 -l $max_lpc_order -e -p $disable" fi
fi fi
done done
done done
for f in 10 11 12 13 14 15 16 17 18 19 ; do for f in 10 11 12 13 14 15 16 17 18 19 ; do
for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do
for opt in 0 1 2 4 5 6 8 ; do if [ -z "$disable" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
for extras in '' '-p' '-e' ; do for opt in 0 1 2 4 5 6 8 ; do
test_file sine16-$f 2 16 "-$opt $extras $disable" for extras in '' '-p' '-e' ; do
if [ -z "$extras" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
test_file sine16-$f 2 16 "-$opt $extras $disable"
fi
done
done done
done if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
if [ "$FLAC__EXHAUSTIVE_TESTS" = yes ] ; then test_file sine16-$f 2 16 "-b 16384 -m -r 8 -l $max_lpc_order -e -p $disable"
test_file sine16-$f 2 16 "-b 16384 -m -r 8 -l $max_lpc_order -e -p $disable" fi
fi fi
done done
done done
echo "Testing noise..." echo "Testing noise..."
for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do for disable in '' '--disable-verbatim-subframes --disable-constant-subframes' '--disable-verbatim-subframes --disable-constant-subframes --disable-fixed-subframes' ; do
for channels in 1 2 4 8 ; do if [ -z "$disable" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
for bps in 8 16 24 ; do for channels in 1 2 4 8 ; do
for opt in 0 1 2 3 4 5 6 7 8 ; do if [ $channels -le 2 ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
for extras in '' '-p' '-e' ; do for bps in 8 16 24 ; do
for blocksize in '' '--lax -b 32' '--lax -b 32768' '--lax -b 65535' ; do for opt in 0 1 2 3 4 5 6 7 8 ; do
test_file noise $channels $bps "-$opt $extras $blocksize $disable" for extras in '' '-p' '-e' ; do
if [ -z "$extras" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
for blocksize in '' '--lax -b 32' '--lax -b 32768' '--lax -b 65535' ; do
if [ -z "$blocksize" ] || [ "$FLAC__TEST_LEVEL" -gt 0 ] ; then
test_file noise $channels $bps "-$opt $extras $blocksize $disable"
fi
done
fi
done
done done
if [ "$FLAC__TEST_LEVEL" -gt 1 ] ; then
test_file noise $channels $bps "-b 16384 -m -r 8 -l $max_lpc_order -e -p $disable"
fi
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 $disable"
fi fi
done done
done fi
done done
Markdown is supported
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