r3974 - in trunk: . tests tests/audio tests/filecheck
- From: timj svn gnome org
- To: svn-commits-list gnome org
- Subject: r3974 - in trunk: . tests tests/audio tests/filecheck
- Date: Mon, 16 Oct 2006 17:06:27 -0400 (EDT)
Author: timj
Date: 2006-10-16 17:05:58 -0400 (Mon, 16 Oct 2006)
New Revision: 3974
Added:
trunk/tests/audio/
trunk/tests/cxxdummy.cc
trunk/tests/filecheck/
trunk/tests/perftest.cc
trunk/tests/testresampler.cc
trunk/tests/testwavechunk.c
Removed:
trunk/slowtests/
Modified:
trunk/ChangeLog
trunk/Makefile.am
trunk/Makefile.decl
trunk/configure.in
trunk/tests/Makefile.am
trunk/tests/audio/Makefile.am
trunk/tests/filecheck/Makefile.am
Log:
Mon Oct 16 22:53:35 2006 Tim Janik <timj gtk org>
* this change accomplishes the move to distinguish test programs
only by the makefile rules they are executed at. check:-programs
are supposed to be quick sanity tests, to be executed e.g. before
commits. slowcheck:-programs are in place to check implementations,
features and auxillary files, and may consume significant amounts
of time. perf:-programs are programs run as performance tests and
should provide performance measurement information as output.
all three targets are supposed to pass without errors for make
distcheck.
* tests/audio/: moved here from slowtests/audio/.
* tests/filecheck/: moved here from slowtests/filecheck/.
* tests/audio/Makefile.am: slight fixups.
* tests/.:
* tests/Makefile.am: moved slowtests/ contents here.
added perftest and testresampler to perf: rule.
* Makefile.decl: added recursive perf: rule. silenced check-local:.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-10-16 11:46:51 UTC (rev 3973)
+++ trunk/ChangeLog 2006-10-16 21:05:58 UTC (rev 3974)
@@ -1,3 +1,26 @@
+Mon Oct 16 22:53:35 2006 Tim Janik <timj gtk org>
+
+ * this change accomplishes the move to distinguish test programs
+ only by the makefile rules they are executed at. check:-programs
+ are supposed to be quick sanity tests, to be executed e.g. before
+ commits. slowcheck:-programs are in place to check implementations,
+ features and auxillary files, and may consume significant amounts
+ of time. perf:-programs are programs run as performance tests and
+ should provide performance measurement information as output.
+ all three targets are supposed to pass without errors for make
+ distcheck.
+
+ * tests/audio/: moved here from slowtests/audio/.
+ * tests/filecheck/: moved here from slowtests/filecheck/.
+
+ * tests/audio/Makefile.am: slight fixups.
+
+ * tests/.:
+ * tests/Makefile.am: moved slowtests/ contents here.
+ added perftest and testresampler to perf: rule.
+
+ * Makefile.decl: added recursive perf: rule. silenced check-local:.
+
Mon Oct 16 13:40:47 2006 Stefan Westerfeld <stefan space twc de>
* tests/bse/Makefile.am:
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2006-10-16 11:46:51 UTC (rev 3973)
+++ trunk/Makefile.am 2006-10-16 21:05:58 UTC (rev 3974)
@@ -4,7 +4,7 @@
## GNU Lesser General Public License version 2 or any later version.
include $(top_srcdir)/Makefile.decl
-SUBDIRS = . data birnet sfi bse plugins shell beast-gtk launchers library tools po tests test slowtests doxer docs web
+SUBDIRS = . data birnet sfi bse plugins shell beast-gtk launchers library tools po tests test doxer docs web
# require automake 1.4
AUTOMAKE_OPTIONS = 1.4 dist-bzip2 no-dist-gzip
@@ -73,6 +73,7 @@
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) slowcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) perf \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
Modified: trunk/Makefile.decl
===================================================================
--- trunk/Makefile.decl 2006-10-16 11:46:51 UTC (rev 3973)
+++ trunk/Makefile.decl 2006-10-16 21:05:58 UTC (rev 3974)
@@ -46,7 +46,20 @@
$(MAKE) -C "$$subdir" $(AM_MAKEFLAGS) slowcheck || \
exit 1 ; \
done
+
+# === check-before / check-after ===
.PHONY: check-before check-after
check-am: check-before
check-local: check-after
-check-local:
+check-local: ; @:
+
+# === perf ===
+# recursive rule supported by all Makefiles to run performance tests
+.PHONY: perf perf-recursive
+perf: perf-recursive
+perf-recursive:
+ @for subdir in $(SUBDIRS) ; do \
+ test "$$subdir" = '.' || \
+ $(MAKE) -C "$$subdir" $(AM_MAKEFLAGS) perf || \
+ exit 1 ; \
+ done
Modified: trunk/configure.in
===================================================================
--- trunk/configure.in 2006-10-16 11:46:51 UTC (rev 3973)
+++ trunk/configure.in 2006-10-16 21:05:58 UTC (rev 3974)
@@ -629,10 +629,9 @@
tests/latency/Makefile
tests/scripts/Makefile
tests/bse/Makefile
+tests/audio/Makefile
+tests/filecheck/Makefile
test/Makefile
-slowtests/Makefile
-slowtests/audio/Makefile
-slowtests/filecheck/Makefile
doxer/Makefile
docs/Makefile
docs/images/Makefile
Modified: trunk/tests/Makefile.am
===================================================================
--- trunk/tests/Makefile.am 2006-10-16 11:46:51 UTC (rev 3973)
+++ trunk/tests/Makefile.am 2006-10-16 21:05:58 UTC (rev 3974)
@@ -1,10 +1,10 @@
# beast/tests
-# Copyright (C) 2003 Tim Janik
+# Copyright (C) 2003-2006 Tim Janik
#
## GNU Lesser General Public License version 2 or any later version.
include $(top_srcdir)/Makefile.decl
-SUBDIRS = latency scripts bse
+SUBDIRS = . latency scripts bse audio filecheck
INCLUDES += -I$(top_srcdir) -I$(top_builddir) -I$(srcdir) -I. $(SFI_CFLAGS)
DEFS += -DG_LOG_DOMAIN="\"BEAST-TEST\"" # -DG_DISABLE_CONST_RETURNS
@@ -12,7 +12,6 @@
SFIDL_INC = --nostdinc -I$(top_srcdir) -I$(top_builddir)
-
# check for .scm i18n strings
#
# check for the presence of i18n strings extracted from .scm files.
@@ -37,3 +36,133 @@
library/scripts/record-midi.scm \
library/scripts/song-parts-operations.scm \
)
+
+
+# === rules to generate built sources ===
+#
+# bsecxxapi.hh
+GENERATED_CLEANFILES += bsecxxapi.hh
+$(srcdir)/perftest.cc: bsecxxapi.hh
+bsecxxapi.hh: $(top_srcdir)/bse/bse.idl $(SFIDL)
+ cd . \
+ && echo -e "#include <sfi/sficxx.hh>\n" > xgen-$(@F) \
+ && $(SFIDL) --client-cxx $(SFIDL_INC) --header $(top_srcdir)/bse/bse.idl >> xgen-$(@F) \
+ && cp xgen-$(@F) $@ \
+ && rm -f xgen-$(@F)
+# bsecxxapi.cc
+GENERATED_CLEANFILES += bsecxxapi.cc
+$(srcdir)/perftest.cc: bsecxxapi.cc
+bsecxxapi.cc: bsecxxapi.hh $(top_srcdir)/bse/bse.idl $(SFIDL)
+ cd . \
+ && echo -e "#include \"bsecxxapi.hh\"\n" > xgen-$(@F) \
+ && $(SFIDL) --client-cxx $(SFIDL_INC) --source $(top_srcdir)/bse/bse.idl >> xgen-$(@F) \
+ && cp xgen-$(@F) $@ \
+ && rm -f xgen-$(@F)
+
+
+# === generation targets ===
+# convenience targets for generated source files
+.PHONY: generated clean-generated
+clean-generated: clean
+ rm -f $(GENERATED) stamp-*
+generated: clean-generated $(GENERATED)
+
+
+# === test programs ===
+TESTS =
+noinst_PROGRAMS = $(TESTS)
+progs_ldadd = $(top_builddir)/bse/libbse.la
+# testwavechunk
+TESTS += testwavechunk
+testwavechunk_SOURCES = testwavechunk.c cxxdummy.cc
+testwavechunk_LDADD = $(progs_ldadd)
+# perftest
+TESTS += perftest
+perftest_SOURCES = perftest.cc bsecxxapi.cc
+perftest_LDADD = $(progs_ldadd)
+# testresampler
+noinst_PROGRAMS += testresampler
+testresampler_SOURCES = testresampler.cc
+testresampler_LDADD = $(progs_ldadd)
+
+# === Resampler tests ===
+check-before: resampler-quick-checks
+resampler-quick-checks:
+ : ## some quick checks (resampler-checks contains actual tests - use make slowcheck)
+ ./testresampler filter-impl
+ ./testresampler accuracy --up --precision=8 --freq-scan=180,18000,180 --max-threshold=45
+ ./testresampler accuracy --down --precision=12 --freq-scan=90,9000,90 --max-threshold=72
+ ./testresampler accuracy --fpu --up --precision=16 --freq-scan=180,18000,180 --max-threshold=89.5
+ ./testresampler accuracy --fpu --oversample --precision=20 --freq-scan=180,18000,180 --max-threshold=113.5
+ ./testresampler accuracy --subsample --precision=24 --freq-scan=90,9000,90 --max-threshold=126
+
+slowcheck: resampler-checks
+resampler-checks:
+ : ## test SSE filter implementation
+ ./testresampler filter-impl
+ : ## (possibly SSEified) upsampler tests
+ ./testresampler accuracy --up --precision=8 --freq-scan=50,18000,50 --max-threshold=45 # ideally: 48dB
+ ./testresampler accuracy --up --precision=12 --freq-scan=50,18000,50 --max-threshold=66.5 # ideally: 72dB
+ ./testresampler accuracy --up --precision=16 --freq-scan=50,18000,50 --max-threshold=89 # ideally: 96dB
+ ./testresampler accuracy --up --precision=20 --freq-scan=50,18000,50 --max-threshold=113.5 # ideally: 120dB
+ ./testresampler accuracy --up --precision=24 --freq-scan=50,18000,50 --max-threshold=126.5 # ideally: 144dB
+ : ## (possibly SSEified) downsampler tests
+ ./testresampler accuracy --down --precision=8 --freq-scan=25,9000,25 --max-threshold=51 # ideally: 48dB
+ ./testresampler accuracy --down --precision=12 --freq-scan=25,9000,25 --max-threshold=72 # ideally: 72dB
+ ./testresampler accuracy --down --precision=16 --freq-scan=25,9000,25 --max-threshold=95 # ideally: 96dB
+ ./testresampler accuracy --down --precision=20 --freq-scan=25,9000,25 --max-threshold=119.5 # ideally: 120dB
+ ./testresampler accuracy --down --precision=24 --freq-scan=25,9000,25 --max-threshold=131 # ideally: 144dB
+ : ## FPU upsampler tests
+ ./testresampler accuracy --fpu --up --precision=8 --freq-scan=50,18000,50 --max-threshold=45 # ideally: 48dB
+ ./testresampler accuracy --fpu --up --precision=12 --freq-scan=50,18000,50 --max-threshold=66.5 # ideally: 72dB
+ ./testresampler accuracy --fpu --up --precision=16 --freq-scan=50,18000,50 --max-threshold=89 # ideally: 96dB
+ ./testresampler accuracy --fpu --up --precision=20 --freq-scan=50,18000,50 --max-threshold=113.5 # ideally: 120dB
+ ./testresampler accuracy --fpu --up --precision=24 --freq-scan=50,18000,50 --max-threshold=126 # ideally: 144dB
+ : ## FPU downsampler tests
+ ./testresampler accuracy --fpu --down --precision=8 --freq-scan=25,9000,25 --max-threshold=51 # ideally: 48dB
+ ./testresampler accuracy --fpu --down --precision=12 --freq-scan=25,9000,25 --max-threshold=72 # ideally: 72dB
+ ./testresampler accuracy --fpu --down --precision=16 --freq-scan=25,9000,25 --max-threshold=95 # ideally: 96dB
+ ./testresampler accuracy --fpu --down --precision=20 --freq-scan=25,9000,25 --max-threshold=119.5 # ideally: 120dB
+ ./testresampler accuracy --fpu --down --precision=24 --freq-scan=25,9000,25 --max-threshold=131 # ideally: 144dB
+ : ## sparse testing of sub- and oversampling (we don't test every combination of
+ : ## flags here, but this is also an uncommon usage scenario)
+ ./testresampler accuracy --oversample --precision=8 --freq-scan=50,18000,50 --max-threshold=45 # ideally: 48dB
+ ./testresampler accuracy --oversample --precision=16 --freq-scan=50,18000,50 --max-threshold=89 # ideally: 96dB
+ ./testresampler accuracy --fpu --oversample --precision=16 --freq-scan=50,18000,50 --max-threshold=89 # ideally: 96dB
+ ./testresampler accuracy --subsample --precision=16 --freq-scan=25,9000,25 --max-threshold=85.5 # ideally: 96dB
+ ./testresampler accuracy --fpu --subsample --precision=16 --freq-scan=25,9000,25 --max-threshold=85.5 # ideally: 96dB
+
+perf:
+ ./perftest
+ ./testresampler perf --fpu --precision=8 --up
+ ./testresampler perf --fpu --precision=8 --down
+ ./testresampler perf --fpu --precision=8 --subsample
+ ./testresampler perf --fpu --precision=8 --oversample
+ ./testresampler perf --precision=8 --up
+ ./testresampler perf --precision=8 --down
+ ./testresampler perf --precision=8 --subsample
+ ./testresampler perf --precision=8 --oversample
+ ./testresampler perf --fpu --precision=16 --up
+ ./testresampler perf --fpu --precision=16 --down
+ ./testresampler perf --fpu --precision=16 --subsample
+ ./testresampler perf --fpu --precision=16 --oversample
+ ./testresampler perf --precision=16 --up
+ ./testresampler perf --precision=16 --down
+ ./testresampler perf --precision=16 --subsample
+ ./testresampler perf --precision=16 --oversample
+ ./testresampler perf --fpu --precision=20 --up
+ ./testresampler perf --fpu --precision=20 --down
+ ./testresampler perf --fpu --precision=20 --subsample
+ ./testresampler perf --fpu --precision=20 --oversample
+ ./testresampler perf --precision=20 --up
+ ./testresampler perf --precision=20 --down
+ ./testresampler perf --precision=20 --subsample
+ ./testresampler perf --precision=20 --oversample
+ ./testresampler perf --fpu --precision=24 --up
+ ./testresampler perf --fpu --precision=24 --down
+ ./testresampler perf --fpu --precision=24 --subsample
+ ./testresampler perf --fpu --precision=24 --oversample
+ ./testresampler perf --precision=24 --up
+ ./testresampler perf --precision=24 --down
+ ./testresampler perf --precision=24 --subsample
+ ./testresampler perf --precision=24 --oversample
Copied: trunk/tests/audio (from rev 3973, trunk/slowtests/audio)
Modified: trunk/tests/audio/Makefile.am
===================================================================
--- trunk/slowtests/audio/Makefile.am 2006-10-16 11:46:51 UTC (rev 3973)
+++ trunk/tests/audio/Makefile.am 2006-10-16 21:05:58 UTC (rev 3974)
@@ -3,8 +3,10 @@
## GNU Lesser General Public License version 2 or any later version.
include $(top_srcdir)/Makefile.decl
-
# === feature test tools ===
+builddirplugins = '$(top_builddir)/plugins/.libs/*.so:$(top_builddir)/plugins/freeverb/.libs/*.so'
+BSEFEXTRACT = $(top_builddir)/tools/bsefextract
+BSEFCOMPARE = $(top_builddir)/tools/bsefcompare
BSE2WAV = $(strip \
$(top_builddir)/shell/bsescm-$(BIN_VERSION) \
--bse-mixing-freq=48000 -p null -m null \
@@ -12,27 +14,23 @@
--bse-override-plugin-globs $(builddirplugins) \
-s $(srcdir)/bse2wav.scm \
)
-builddirplugins = '$(top_builddir)/plugins/.libs/*.so:$(top_builddir)/plugins/freeverb/.libs/*.so'
-BSEFEXTRACT = $(top_builddir)/tools/bsefextract
-BSEFCOMPARE = $(top_builddir)/tools/bsefcompare
EXTRA_DIST += bse2wav.scm
-# === run tests upon make check ===
+# === audio feature test rule ===
FEATURE_TESTS =
-check-before: check-feature-tests
.PHONY: check-feature-tests $(FEATURE_TESTS)
-FEATURE_TESTS_MSG = "All $(words $(FEATURE_TESTS)) audio tests passed"
check-feature-tests: # $(FEATURE_TESTS)
@for tst in $(FEATURE_TESTS) ; do \
echo "TEST: $$tst" ; \
$(MAKE) -C ./ $(AM_MAKEFLAGS) $$tst || exit $? ; \
echo "PASS: $$tst" ; \
done
- @echo $(FEATURE_TESTS_MSG) | sed 's/./=/g'
- @echo $(FEATURE_TESTS_MSG)
- @echo $(FEATURE_TESTS_MSG) | sed 's/./=/g'
-
-# === feature test temporaries ===
+ @MESSAGETEXT="All $(words $(FEATURE_TESTS)) audio tests passed" \
+ && echo $$MESSAGETEXT | sed 's/./=/g' \
+ && echo $$MESSAGETEXT \
+ && echo $$MESSAGETEXT | sed 's/./=/g'
+slowcheck: check-feature-tests
+# feature test temporaries
CLEANFILES += *.tmp *.wav
# === feature tests ===
@@ -87,5 +85,5 @@
$(BSE2WAV) $(top_srcdir)/library/demo/partymonster.bse $(@F).wav
$(BSEFEXTRACT) $(@F).wav --cut-zeros --channel 0 --avg-spectrum --spectrum --avg-energy --end-time > $(@F).tmp
$(BSEFEXTRACT) $(@F).wav --cut-zeros --channel 1 --avg-spectrum --spectrum --avg-energy --end-time >> $(@F).tmp
- $(BSEFCOMPARE) $(srcdir)/partymonster.ref $(@F).tmp --threshold 99.9 # <- needs deterministic random
+ $(BSEFCOMPARE) $(srcdir)/partymonster.ref $(@F).tmp --threshold 99.9 # <- needs deterministic randomization
rm -f $(@F).tmp $(@F).wav
Copied: trunk/tests/cxxdummy.cc (from rev 3973, trunk/slowtests/cxxdummy.cc)
Copied: trunk/tests/filecheck (from rev 3973, trunk/slowtests/filecheck)
Modified: trunk/tests/filecheck/Makefile.am
===================================================================
--- trunk/slowtests/filecheck/Makefile.am 2006-10-16 11:46:51 UTC (rev 3973)
+++ trunk/tests/filecheck/Makefile.am 2006-10-16 21:05:58 UTC (rev 3974)
@@ -1,4 +1,4 @@
-# beast/slowtests
+# beast/tests/filecheck
# Copyright (C) 2003-2006 Tim Janik
#
## GNU Lesser General Public License version 2 or any later version.
@@ -35,10 +35,11 @@
grep -Fq "(bse-version \"$$TESTVERSION" || \
{ grep -F bse-version "$$file" ; exit 1 ; } \
done
- @echo "=================================="
- @echo "All BSE files passed version check"
- @echo "=================================="
-SKIP_PATTERN = "tests/latency/midi-latency.bse|slowtests/audio/minisong.bse"
+ @MESSAGETEXT="All tested BSE files passed version check" \
+ && echo $$MESSAGETEXT | sed 's/./=/g' \
+ && echo $$MESSAGETEXT \
+ && echo $$MESSAGETEXT | sed 's/./=/g'
+SKIP_PATTERN = "tests/latency/midi-latency.bse|tests/audio/minisong.bse"
bse-loading-check: distfiles.list
for tfile in `grep '\.bse$$' distfiles.list` ; do \
file="$(top_srcdir)/$$tfile" ; \
@@ -51,9 +52,10 @@
test ! -s "warnings.tmp" || exit 1 ; \
fi ; \
done
- @echo "================================="
- @echo "All BSE files passed loading test"
- @echo "================================="
+ @MESSAGETEXT="All tested BSE files passed loading test" \
+ && echo $$MESSAGETEXT | sed 's/./=/g' \
+ && echo $$MESSAGETEXT \
+ && echo $$MESSAGETEXT | sed 's/./=/g'
CLEANFILES += distfiles.list warnings.tmp
check-after: bse-version-check bse-loading-check
plugin_globs = '$(top_builddir)/plugins/.libs/*.so:$(top_builddir)/plugins/freeverb/.libs/*.so'
@@ -63,5 +65,5 @@
-p null -m null \
--bse-rcfile "/dev/null" --bse-no-load \
--bse-override-plugin-globs '$(plugin_globs)' \
- -s "$(top_srcdir)/slowtests/filecheck/checkproject.scm" \
+ -s "$(top_srcdir)/tests/filecheck/checkproject.scm" \
)
Copied: trunk/tests/perftest.cc (from rev 3973, trunk/slowtests/perftest.cc)
Copied: trunk/tests/testresampler.cc (from rev 3973, trunk/slowtests/testresampler.cc)
Copied: trunk/tests/testwavechunk.c (from rev 3973, trunk/slowtests/testwavechunk.c)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]