[beast: 4/10] TESTS: filecheck: use git ls-tree to find BSE files to check



commit 5f0890bd98cc42978fe7076931bfec473d49b2bd
Author: Tim Janik <timj gnu org>
Date:   Sun Jun 18 01:31:48 2017 +0200

    TESTS: filecheck: use git ls-tree to find BSE files to check
    
    Signed-off-by: Tim Janik <timj gnu org>

 tests/filecheck/Makefile.am |   46 +++++++++++++++++++++---------------------
 1 files changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/tests/filecheck/Makefile.am b/tests/filecheck/Makefile.am
index 1100b8e..38c589d 100644
--- a/tests/filecheck/Makefile.am
+++ b/tests/filecheck/Makefile.am
@@ -9,42 +9,41 @@ 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 the distfile-list:-rule
-# which is specified in Makefile.decl and included in each subdir, then
-# filtering out bse files and finally trying to load these without warnings.
-DISTFILE_LIST_NAME=$(shell pwd)/distfiles.list
-distfiles.list: Makefile
-       rm -f distfiles.list
-       test ! -e distfiles.list
-       test ! -e $(DISTFILE_LIST_NAME)
-       echo > $(DISTFILE_LIST_NAME)
-       test -e distfiles.list
-       test -e $(DISTFILE_LIST_NAME)
-       cd $(top_builddir) && make distfile-list DISTFILE_LIST=$(DISTFILE_LIST_NAME)
-CLEANFILES += distfiles.list
+# == 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 the distfile-list
+# rule and then filtering out bse files and finally trying to load
+# these without warnings.
+distfiles.list: $(GITSTAMPS)
+       git ls-tree --name-only --full-tree -r HEAD > $@.tmp
+       mv $@.tmp $@
+CLEANFILES += @INGIT@ distfiles.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: distfiles.list # generate checklist-a .. checklist-e
+       $(Q) grep '\.bse$$' distfiles.list > checklist || \
+       { echo '$@: error: distfiles.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) "$$tfile" 2>&1 | tee $(@F).log ;    \
+             $(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=)
-checklists: distfiles.list # generate checklist-a .. checklist-e
-       $(Q) grep '\.bse$$' distfiles.list > checklist || \
-       { echo '$@: error: distfiles.list is empty' >&2; exit 1; }
-       $(Q) split -n l/5 -a 1 checklist checklist-
-       $(Q) rm -f checklist
 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                                            \
@@ -55,7 +54,7 @@ CHECK_LOAD   = $(strip        $(top_builddir)/bse/bsetool                             \
                          --bse-override-sample-path $(samplepath)              \
 )
 
-.PHONY: bse-version-check
+# == bse-version-check ==
 bse-version-check: distfiles.list
        TESTVERSION="$(BST_MAJOR_VERSION).$(BST_MINOR_VERSION)." ;      \
        for tfile in `grep '\.bse$$' distfiles.list` ; do               \
@@ -69,5 +68,6 @@ bse-version-check: distfiles.list
        && 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]