diff options
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r-- | tests/Makefile.am | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index c581258a..831f7a96 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -57,6 +57,11 @@ jsonlines1.testfile \ jsonlines1.result \ matilde.arm.result \ matilde.arm.testfile \ +multiple-A.magic \ +multiple-B.magic \ +multiple.flags \ +multiple.result \ +multiple.testfile \ pcjr.result \ pcjr.testfile \ pgp-binary-key-v2-phil.result \ @@ -127,14 +132,27 @@ zstd-v0.8-FF.testfile T = $(top_srcdir)/tests check-local: - MAGIC=$(top_builddir)/magic/magic ./test set -e; \ for i in $T/*.testfile; do \ - echo Running test: $$i; \ - if [ -f $${i%%.testfile}.magic ]; then \ - m=$${i%%.testfile}.magic; \ - else \ + t=$${i%%.testfile}; \ + echo Running test: $$t; \ + m=; \ + for j in $$(eval echo $${t}\*.magic); do \ + if [ -f "$$j" ]; then \ + if [ -z "$$m" ]; then \ + m=$$j; \ + else \ + m=$$m:$$j; \ + fi \ + fi \ + done; \ + if [ -z "$$m" ]; then \ m=$(top_builddir)/magic/magic; \ fi; \ - TZ=UTC MAGIC=$$m ./test $$i $${i%%.testfile}.result; \ + f=-e; \ + if [ -f $${t}.flags ]; then \ + f=$$f$$(cat $${t}.flags); \ + fi; \ + echo TZ=UTC MAGIC=$$m ./test $$f $$i $${t}.result; \ + TZ=UTC MAGIC=$$m ./test $$f $$i $${t}.result; \ done |