[beast: 7/17] TESTS: move bsefile-check and Bse version check into tests/Makefile.sub



commit 390bdb440333a85318b4a0b3b955dcc0be4789c3
Author: Tim Janik <timj gnu org>
Date:   Sun Oct 15 20:37:53 2017 +0200

    TESTS: move bsefile-check and Bse version check into tests/Makefile.sub
    
    Signed-off-by: Tim Janik <timj gnu org>

 tests/Makefile.am           |    2 +-
 tests/Makefile.sub          |   65 +++++++++++++++++++++++++++++++++++++++++++
 tests/filecheck/Makefile.am |   63 -----------------------------------------
 3 files changed, 66 insertions(+), 64 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 776f25b..3b8fa03 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,4 +1,4 @@
 # BEAST & BSE
 include $(top_srcdir)/Makefile.decl
 
-SUBDIRS = . latency scripts bse audio filecheck
+SUBDIRS = . latency scripts bse audio
diff --git a/tests/Makefile.sub b/tests/Makefile.sub
index 35b8256..0089d0b 100644
--- a/tests/Makefile.sub
+++ b/tests/Makefile.sub
@@ -145,3 +145,68 @@ tests-testresampler-check-perf:
        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)/tests/audio:$(top_srcdir)/library/samples' \
+         --bse-override-plugin-globs 
'$(top_builddir)/plugins/.libs/*.so:$(top_builddir)/plugins/freeverb/.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
diff --git a/tests/filecheck/Makefile.am b/tests/filecheck/Makefile.am
index bd89030..4e6225d 100644
--- a/tests/filecheck/Makefile.am
+++ b/tests/filecheck/Makefile.am
@@ -9,68 +9,5 @@ SFIDL = $(top_builddir)/sfi/sfidl
 SFIDL_INC = --nostdinc -I$(top_srcdir) -I$(top_builddir)
 
 
-# == BSE file check ==
-# This test checks that all .bse files contained in the beast tarball
-# will load without any warnings or errors being issued. This is done
-# by first constructing the tarball file list via git ls-tree and then
-# filtering out bse files and finally trying to load these without warnings.
-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
-CLEANFILES += @INGIT@ bsefiles.list
-noinst_DATA += bsefiles.list
-EXTRA_DIST += bsefiles.list
 
-# == checklist rules ==
-# 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.
-checklists: bsefiles.list # generate checklist-a .. checklist-e
-       $(Q) grep '\.bse$$' bsefiles.list > checklist || \
-       { echo '$@: error: bsefiles.list is empty' >&2; exit 1; }
-       $(Q) split -n l/5 -a 1 checklist checklist-
-       $(Q) rm -f checklist
-SKIP_PATTERN = "tests/latency/midi-latency.bse"
-checklist-%-test: checklists
-       $(Q) for tfile in `cat $(@F:-test=)` ; do               \
-           if echo "$$tfile" | egrep -q $(SKIP_PATTERN) ; then \
-             echo "  SKIP     Loading: $$tfile" ;              \
-           else                                                \
-             $(CHECK_LOAD) "$(abs_top_builddir)/$$tfile" 2>&1 | tee $(@F).log ; \
-             test ! -s $(@F).log || exit 1                     \
-             && echo "  OK       Loading: $$tfile" ;           \
-           fi ; done ; rm -f $(@F).log $(@F:-test=)
-CLEANFILES += checklists checklist-? checklist-?-test checklist-?-test.log
-check-local: checklist-a-test checklist-b-test checklist-c-test checklist-d-test checklist-e-test
-plugin_globs = '$(top_builddir)/plugins/.libs/*.so:$(top_builddir)/plugins/freeverb/.libs/*.so'
-samplepath   = '$(top_srcdir)/tests/audio:$(top_srcdir)/library/samples'
-# Loading tests need all available samples and plugins.
-CHECK_LOAD   = $(strip $(top_builddir)/bse/bsetool                             \
-                         $(if $(findstring 1, $(V)),, --quiet)                 \
-                         check-load                                            \
-                         --bse-pcm-driver null=nosleep                         \
-                         --bse-midi-driver null                                \
-                         --bse-rcfile "/dev/null"                              \
-                         --bse-override-plugin-globs '$(plugin_globs)'         \
-                         --bse-override-sample-path $(samplepath)              \
-)
-
-# == bse-version-check ==
-bse-version-check: bsefiles.list
-       TESTVERSION="$(BST_MAJOR_VERSION).$(BST_MINOR_VERSION)." ;      \
-       for tfile in `cat bsefiles.list` ; do                           \
-         file="$(top_srcdir)/$$tfile" ;                                \
-         echo "Check project 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: bse-version-check
-check: # bse-version-check
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]