/
Makefile.sub
233 lines (220 loc) · 11.8 KB
/
Makefile.sub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# BEAST tests/
NOINST_TESTS =
TESTS_CLEANFILES = $(NOINST_TESTS)
noinst_PROGRAMS += $(NOINST_TESTS)
# == clean-tests ==
clean-tests:
rm -f $(TESTS_CLEANFILES) tests/*.$(OBJEXT)
clean-local: clean-tests
.PHONY: clean-tests
# == check-tests ==
tests_check_TARGETS =
check-tests: $(tests_check_TARGETS)
check-local: check-tests
.PHONY: check-tests
define tests_foreach_RULE
$(TESTPRG)\ CHECK: $(TESTPRG)
@echo ' EXEC ' $(TESTPRG) ; $(TESTPRG)
check-tests: $(TESTPRG)\ CHECK
.PHONY: $(TESTPRG)\ CHECK
endef
$(foreach TESTPRG,$(NOINST_TESTS),$(eval $(call tests_foreach_RULE,$(TESTPRG))))
# == installcheck-tests ==
installcheck-tests:
installcheck-local: installcheck-tests
.PHONY: installcheck-tests
# == suite1 ==
NOINST_TESTS += tests/suite1
tests_suite1_CXXFLAGS = $(AM_CXXFLAGS) $(SFI_CFLAGS)
tests_suite1_LDADD = sfi/libsfi-@MAJOR@.la $(BSE_LIBS)
tests_suite1_SOURCES = \
tests/suite1-main.cc \
tests/suite1-randomhash.cc
# == testwavechunk ==
NOINST_TESTS += tests/testwavechunk
SLOWTESTS += tests/testwavechunk
tests_testwavechunk_CXXFLAGS = $(AM_CXXFLAGS) $(SFI_CFLAGS)
tests_testwavechunk_LDADD = bse/libbse-@MAJOR@.la $(BSE_LIBS)
tests_testwavechunk_SOURCES = \
tests/testwavechunk.cc
# == testresamplerq ==
NOINST_TESTS += tests/testresamplerq
tests_testresamplerq_CXXFLAGS = $(AM_CXXFLAGS) $(SFI_CFLAGS)
tests_testresamplerq_LDADD = bse/libbse-@MAJOR@.la $(BSE_LIBS)
tests_testresamplerq_SOURCES = \
tests/testresamplerq.cc
# == filtertest ==
NOINST_TESTS += tests/filtertest
tests_filtertest_CXXFLAGS = $(AM_CXXFLAGS) $(SFI_CFLAGS)
tests_filtertest_LDADD = bse/libbse-@MAJOR@.la $(BSE_LIBS)
tests_filtertest_SOURCES = \
tests/filtertest.cc
# == plugintest ==
noinst_LTLIBRARIES += tests/plugintest.la
tests_plugintest_la_CXXFLAGS = $(AM_CXXFLAGS) $(SFI_CFLAGS)
tests_plugintest_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version
tests_plugintest_la_LIBADD = bse/libbse-@MAJOR@.la $(BSE_LIBS)
tests_plugintest_la_SOURCES = \
tests/plugintest.cc
tests/plugintest.genidl.hh: tests/plugintest.idl $(SFIDL)
$(SFIDL) --core-cxx $(SFIDL_INC) -I$(top_builddir) $< > $@.tmp
mv $@.tmp $@
TESTS_CLEANFILES += tests/plugintest.genidl.hh tests/plugintest.genidl.hh.tmp
$(tests_plugintest_la_SOURCES): tests/plugintest.genidl.hh tests/plugintest.idl
# tihs is merely a compilation test for Bse plugins
# == testresampler ==
#NOINST_TESTS += tests/testresampler
noinst_PROGRAMS += tests/testresampler
tests_testresampler_CXXFLAGS = $(AM_CXXFLAGS) $(SFI_CFLAGS)
tests_testresampler_LDADD = bse/libbse-@MAJOR@.la $(BSE_LIBS)
tests_testresampler_SOURCES = \
tests/testresampler.cc
tests-testresampler-check-filter-impl:
$(QTEST)
$(Q) tests/testresampler filter-impl
tests-testresampler-check-precision8:
$(QTEST)
$(Q) tests/testresampler accuracy --up --precision=8 --freq-scan=180,18000,1979 --max-threshold=45
tests-testresampler-check-precision12:
$(QTEST)
$(Q) tests/testresampler accuracy --down --precision=12 --freq-scan=90,9000,997 --max-threshold=72
tests-testresampler-check-precision16:
$(QTEST)
$(Q) tests/testresampler accuracy --fpu --up --precision=16 --freq-scan=180,18000,1453 --max-threshold=89.5
tests-testresampler-check-precision20:
$(QTEST)
$(Q) tests/testresampler accuracy --fpu --oversample --precision=20 --freq-scan=180,18000,1671 --max-threshold=113.5
tests-testresampler-check-precision24:
$(QTEST)
$(Q) tests/testresampler accuracy --subsample --precision=24 --freq-scan=90,9000,983 --max-threshold=126
check-tests: tests-testresampler-check-filter-impl tests-testresampler-check-precision8 tests-testresampler-check-precision12
check-tests: tests-testresampler-check-precision16 tests-testresampler-check-precision20 tests-testresampler-check-precision24
tests-testresampler-check-all:
: ## test SSE filter implementation
tests/testresampler filter-impl
: ## (possibly SSEified) upsampler tests
tests/testresampler accuracy --up --precision=8 --freq-scan=50,18000,50 --max-threshold=45 # ideally: 48dB
tests/testresampler accuracy --up --precision=12 --freq-scan=50,18000,50 --max-threshold=66.5 # ideally: 72dB
tests/testresampler accuracy --up --precision=16 --freq-scan=50,18000,50 --max-threshold=89 # ideally: 96dB
tests/testresampler accuracy --up --precision=20 --freq-scan=50,18000,50 --max-threshold=113.5 # ideally: 120dB
tests/testresampler accuracy --up --precision=24 --freq-scan=50,18000,50 --max-threshold=126.5 # ideally: 144dB
: ## (possibly SSEified) downsampler tests
tests/testresampler accuracy --down --precision=8 --freq-scan=25,9000,25 --max-threshold=51 # ideally: 48dB
tests/testresampler accuracy --down --precision=12 --freq-scan=25,9000,25 --max-threshold=72 # ideally: 72dB
tests/testresampler accuracy --down --precision=16 --freq-scan=25,9000,25 --max-threshold=95 # ideally: 96dB
tests/testresampler accuracy --down --precision=20 --freq-scan=25,9000,25 --max-threshold=119.5 # ideally: 120dB
tests/testresampler accuracy --down --precision=24 --freq-scan=25,9000,25 --max-threshold=131 # ideally: 144dB
: ## FPU upsampler tests
tests/testresampler accuracy --fpu --up --precision=8 --freq-scan=50,18000,50 --max-threshold=45 # ideally: 48dB
tests/testresampler accuracy --fpu --up --precision=12 --freq-scan=50,18000,50 --max-threshold=66.5 # ideally: 72dB
tests/testresampler accuracy --fpu --up --precision=16 --freq-scan=50,18000,50 --max-threshold=89 # ideally: 96dB
tests/testresampler accuracy --fpu --up --precision=20 --freq-scan=50,18000,50 --max-threshold=113.5 # ideally: 120dB
tests/testresampler accuracy --fpu --up --precision=24 --freq-scan=50,18000,50 --max-threshold=126 # ideally: 144dB
: ## FPU downsampler tests
tests/testresampler accuracy --fpu --down --precision=8 --freq-scan=25,9000,25 --max-threshold=51 # ideally: 48dB
tests/testresampler accuracy --fpu --down --precision=12 --freq-scan=25,9000,25 --max-threshold=72 # ideally: 72dB
tests/testresampler accuracy --fpu --down --precision=16 --freq-scan=25,9000,25 --max-threshold=95 # ideally: 96dB
tests/testresampler accuracy --fpu --down --precision=20 --freq-scan=25,9000,25 --max-threshold=119.5 # ideally: 120dB
tests/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)
tests/testresampler accuracy --oversample --precision=8 --freq-scan=50,18000,50 --max-threshold=45 # ideally: 48dB
tests/testresampler accuracy --oversample --precision=16 --freq-scan=50,18000,50 --max-threshold=89 # ideally: 96dB
tests/testresampler accuracy --fpu --oversample --precision=16 --freq-scan=50,18000,50 --max-threshold=89 # ideally: 96dB
tests/testresampler accuracy --subsample --precision=16 --freq-scan=25,9000,25 --max-threshold=85.5 # ideally: 96dB
tests/testresampler accuracy --fpu --subsample --precision=16 --freq-scan=25,9000,25 --max-threshold=85.5 # ideally: 96dB
tests-testresampler-check-perf:
tests/testresampler perf --fpu --precision=8 --up
tests/testresampler perf --fpu --precision=8 --down
tests/testresampler perf --fpu --precision=8 --subsample
tests/testresampler perf --fpu --precision=8 --oversample
tests/testresampler perf --precision=8 --up
tests/testresampler perf --precision=8 --down
tests/testresampler perf --precision=8 --subsample
tests/testresampler perf --precision=8 --oversample
tests/testresampler perf --fpu --precision=16 --up
tests/testresampler perf --fpu --precision=16 --down
tests/testresampler perf --fpu --precision=16 --subsample
tests/testresampler perf --fpu --precision=16 --oversample
tests/testresampler perf --precision=16 --up
tests/testresampler perf --precision=16 --down
tests/testresampler perf --precision=16 --subsample
tests/testresampler perf --precision=16 --oversample
tests/testresampler perf --fpu --precision=20 --up
tests/testresampler perf --fpu --precision=20 --down
tests/testresampler perf --fpu --precision=20 --subsample
tests/testresampler perf --fpu --precision=20 --oversample
tests/testresampler perf --precision=20 --up
tests/testresampler perf --precision=20 --down
tests/testresampler perf --precision=20 --subsample
tests/testresampler perf --precision=20 --oversample
tests/testresampler perf --fpu --precision=24 --up
tests/testresampler perf --fpu --precision=24 --down
tests/testresampler perf --fpu --precision=24 --subsample
tests/testresampler perf --fpu --precision=24 --oversample
tests/testresampler perf --precision=24 --up
tests/testresampler perf --precision=24 --down
tests/testresampler perf --precision=24 --subsample
tests/testresampler perf --precision=24 --oversample
# == bsefiles.list ==
# Construct the list of shipped BSE files by first constructing the tarball
# file list via git ls-tree and then filtering the bse files.
noinst_DATA += tests/bsefiles.list
TESTS_CLEANFILES += @INGIT@ bsefiles.list
EXTRA_DIST += tests/bsefiles.list
tests/bsefiles.list: $(GITSTAMP)
$(AM_V_GEN)
$(Q) git ls-tree --name-only --full-tree -r HEAD > $@.tmp1
$(Q) grep '\.bse$$' $@.tmp1 > $@.tmp2
$(Q) mv $@.tmp2 $@ && rm -f $@.tmp1
# == tests-bsefile-check ==
# This test checks that all .bse files contained in the beast tarball
# will load without any warnings or errors being issued. At first,
# we split the (long) list of files into multiple lists that can be
# checked in parallel. For each file in a list, unless it matches
# the skip-pattern, try to load it and check the output logs.
tests/bsefile-checklist: tests/bsefiles.list # generate checklist-a .. checklist-e
$(Q) grep '\.bse$$' $< > $@ || \
{ echo '$@: error: bsefiles.list is empty' >&2; exit 1; }
$(Q) cd tests && split -n l/5 -a 1 $(@F) $(@F)-
$(Q) rm -f $@
SKIP_PATTERN = "tests/latency/midi-latency.bse"
# Check-load ensures BSE loading works, it needs all available samples and plugins
TESTS_BSEFILE_CHECK_LOAD = $(strip \
$(topdir)/bse/bsetool \
$(if $(findstring 1, $(V)),, --quiet) \
check-load \
--bse-pcm-driver null=nosleep \
--bse-midi-driver null \
--bse-override-sample-path '$(top_srcdir)/af-tests:$(top_srcdir)/library/samples' \
--bse-override-plugin-globs '$(top_builddir)/plugins/.libs/*.so:$(top_builddir)/plugins/freeverb/.libs/*.so:$(top_builddir)/plugins/bleposc/.libs/*.so' \
--bse-rcfile "/dev/null" )
tests/bsefile-checklist-%-test: tests/bsefile-checklist
$(Q) for tfile in `cat $(@:-test=)` ; do \
if echo "$$tfile" | egrep -q $(SKIP_PATTERN) ; then \
echo " SKIP Loading: $$tfile" ; \
else \
$(TESTS_BSEFILE_CHECK_LOAD) "$(topdir)/$$tfile" 2>&1 | \
tee $@.log ; \
test ! -s $@.log || exit 1 \
&& echo " OK Loading: $$tfile" ; \
fi ; done ; rm -f $@.log $(@:-test=)
TESTS_CLEANFILES += tests/bsefile-checklist tests/bsefile-checklist-? tests/bsefile-checklist-?-test tests/bsefile-checklist-?-test.log
check-tests: tests/bsefile-checklist-a-test tests/bsefile-checklist-b-test tests/bsefile-checklist-c-test \
tests/bsefile-checklist-d-test tests/bsefile-checklist-e-test
# == tests-bse-version-check ==
tests-bse-version-check: tests/bsefiles.list
TESTVERSION="$(MAJOR).$(MINOR)." ; \
for tfile in `cat $<` ; do \
file="$(topdir)/$$tfile" ; \
echo " VERIFY Newest BSE Version: $$file" ; \
head -n5 "$$file" | \
grep -Fq "(bse-version \"$$TESTVERSION" || \
{ grep -F bse-version "$$file" ; exit 1 ; } \
done
@MESSAGETEXT="All tested BSE files passed version check" \
&& echo $$MESSAGETEXT | sed 's/./=/g' \
&& echo $$MESSAGETEXT \
&& echo $$MESSAGETEXT | sed 's/./=/g'
.PHONY: tests-bse-version-check
#check-tests: tests-bse-version-check